From: Richard Stallman Date: Fri, 14 May 1993 17:14:17 +0000 (+0000) Subject: (default_conversion): Don't replace iterator with its initial value. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec193993f9d1ac17f5489056059c37a7cfb2788e;p=gcc.git (default_conversion): Don't replace iterator with its initial value. From-SVN: r4452 --- diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 2e3b0185553..0989b690601 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -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);