aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2005-08-18 05:01:43 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-08-17 22:01:43 -0700
commit75634129185af1ffcc0d88f5032b90b26559674a (patch)
tree19dfd6fc957e829f7c1c22434c2781952973a329
parent9bc2a5cb82fe921d7806a2b4aed4c6f25e806ae4 (diff)
downloadgcc-75634129185af1ffcc0d88f5032b90b26559674a.zip
gcc-75634129185af1ffcc0d88f5032b90b26559674a.tar.gz
gcc-75634129185af1ffcc0d88f5032b90b26559674a.tar.bz2
re PR middle-end/16045 (ICE fold check: original tree changed by fold)
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/builtins.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9de3adb..c338e8e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 13d80ed..d02b1c3 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -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;
}