re PR middle-end/16045 (ICE fold check: original tree changed by fold)
authorAndrew Pinski <pinskia@physics.uc.edu>
Thu, 18 Aug 2005 05:01:43 +0000 (05:01 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Thu, 18 Aug 2005 05:01:43 +0000 (22:01 -0700)
2005-08-18  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/16045
        * builtins.c (fold_builtin): Create a new NOP_EXPR all the time.

From-SVN: r103243

gcc/ChangeLog
gcc/builtins.c

index 9de3adb..c338e8e 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-18  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR middle-end/16045
+       * builtins.c (fold_builtin): Create a new NOP_EXPR all the time.
+
 2005-08-17  James E Wilson  <wilson@specifix.com>
 
        * c-decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE in
index 13d80ed..d02b1c3 100644 (file)
@@ -8910,9 +8910,7 @@ fold_builtin (tree fndecl, tree arglist, bool ignore)
   tree exp = fold_builtin_1 (fndecl, arglist, ignore);
   if (exp)
     {
-      /* ??? Don't clobber shared nodes such as integer_zero_node.  */
-      if (CONSTANT_CLASS_P (exp))
-       exp = build1 (NOP_EXPR, TREE_TYPE (exp), exp);
+      exp = build1 (NOP_EXPR, TREE_TYPE (exp), exp);
       TREE_NO_WARNING (exp) = 1;
     }