From ec193993f9d1ac17f5489056059c37a7cfb2788e Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Fri, 14 May 1993 17:14:17 +0000 Subject: [PATCH] (default_conversion): Don't replace iterator with its initial value. From-SVN: r4452 --- gcc/c-typeck.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.30.2