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
This commit is contained in:
Andrew Pinski 2005-08-18 05:01:43 +00:00 committed by Andrew Pinski
parent 9bc2a5cb82
commit 7563412918
2 changed files with 6 additions and 3 deletions

View 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

View 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;
}