]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fold-const.c (fold): Ensure that we don't alter the expression's type when folding...
authorMike Stump <mrs@gcc.gnu.org>
Tue, 2 May 1995 19:39:17 +0000 (19:39 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Tue, 2 May 1995 19:39:17 +0000 (19:39 +0000)
        * fold-const.c (fold): Ensure that we don't alter the expression's
        type when folding CLEANUP_POINT_EXPRs.

From-SVN: r9563

gcc/fold-const.c

index 56f228cd76447dea59003e35e7a3ca82707f5dd3..dd0f8a2b75d23398ac2d0adc772d580fc4db5a58 100644 (file)
@@ -5044,7 +5044,7 @@ fold (expr)
       /* Pull arithmetic ops out of the CLEANUP_POINT_EXPR where
          appropriate.  */
     case CLEANUP_POINT_EXPR:
-      if (! TREE_SIDE_EFFECTS (arg0))
+      if (! TREE_SIDE_EFFECTS (arg0) && type == TREE_TYPE (arg0))
        return arg0;
 
       {