(default_conversion): Don't replace iterator with its initial value.
authorRichard Stallman <rms@gnu.org>
Fri, 14 May 1993 17:14:17 +0000 (17:14 +0000)
committerRichard Stallman <rms@gnu.org>
Fri, 14 May 1993 17:14:17 +0000 (17:14 +0000)
From-SVN: r4452

gcc/c-typeck.c

index 2e3b018..0989b69 100644 (file)
@@ -920,6 +920,8 @@ default_conversion (exp)
   else if (optimize
           && TREE_CODE (exp) == VAR_DECL
           && TREE_READONLY (exp)
+          /* But not for iterators!  */
+          && !ITERATOR_P (exp)
           && DECL_MODE (exp) != BLKmode)
     {
       exp = decl_constant_value (exp);