summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-23 10:18:03 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-23 10:18:03 +0000
commit6ba60c90521c0d4d53781f20191d5e29dde731f2 (patch)
tree0bd4265ebfbee024be2b7dafe59a6165336d35a4 /gcc/fold-const.c
parentce64f869ff2dca53c9f42990aff9c775bc84269c (diff)
downloadgcc-6ba60c90521c0d4d53781f20191d5e29dde731f2.tar.gz
PR c/48685
* fold-const.c (fold_convert_loc): Add NOP_EXPR when casting to VOID_TYPE even around MODIFY_EXPR. * gcc.dg/pr48685.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172895 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index c4bf08819b3..8f90f6f108a 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2029,8 +2029,6 @@ fold_convert_loc (location_t loc, tree type, tree arg)
case VOID_TYPE:
tem = fold_ignored_result (arg);
- if (TREE_CODE (tem) == MODIFY_EXPR)
- goto fold_convert_exit;
return fold_build1_loc (loc, NOP_EXPR, type, tem);
default: