Commit 122977b9 by Mike Stump

fold-const.c (fold): Ensure that we don't alter the expression's type when…

fold-const.c (fold): Ensure that we don't alter the expression's type when folding CLEANUP_POINT_EXPRs.

        * fold-const.c (fold): Ensure that we don't alter the expression's
        type when folding CLEANUP_POINT_EXPRs.

From-SVN: r9563
parent 91e66235
...@@ -5044,7 +5044,7 @@ fold (expr) ...@@ -5044,7 +5044,7 @@ fold (expr)
/* Pull arithmetic ops out of the CLEANUP_POINT_EXPR where /* Pull arithmetic ops out of the CLEANUP_POINT_EXPR where
appropriate. */ appropriate. */
case CLEANUP_POINT_EXPR: case CLEANUP_POINT_EXPR:
if (! TREE_SIDE_EFFECTS (arg0)) if (! TREE_SIDE_EFFECTS (arg0) && type == TREE_TYPE (arg0))
return arg0; return arg0;
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment