aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1995-05-02 19:39:17 +0000
committerMike Stump <mrs@gcc.gnu.org>1995-05-02 19:39:17 +0000
commit122977b9df2cc7098292c6555c617ad423a2a2ab (patch)
tree63b2d8cc5c9be4e3acda6d7c0349f838461d78a0 /gcc
parent91e66235060bd49c9af50928f325f815889e4eee (diff)
downloadgcc-122977b9df2cc7098292c6555c617ad423a2a2ab.zip
gcc-122977b9df2cc7098292c6555c617ad423a2a2ab.tar.gz
gcc-122977b9df2cc7098292c6555c617ad423a2a2ab.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fold-const.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 56f228c..dd0f8a2 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -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;
{