aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-09-18 12:52:31 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-09-18 12:52:31 +0000
commit3d9fbb9abd4785660983bc1d239f3f03e8dbc67c (patch)
tree61f41c90f3305be3ed3d3d0a98c933c45e676023 /gcc/tree-cfg.c
parent35f2d8efd6b2d344c2147f13b8757547afc8a604 (diff)
downloadgcc-3d9fbb9abd4785660983bc1d239f3f03e8dbc67c.zip
gcc-3d9fbb9abd4785660983bc1d239f3f03e8dbc67c.tar.gz
gcc-3d9fbb9abd4785660983bc1d239f3f03e8dbc67c.tar.bz2
re PR middle-end/37284 (ICE on valid code with -fstrict-aliasing)
2008-09-18 Richard Guenther <rguenther@suse.de> PR middle-end/37284 * tree-cfg.c (remove_useless_stmts_1): Remove GIMPLE_CHANGE_DYNAMIC_TYPE if not optimizing. * g++.dg/tree-ssa/pr37284.C: New testcase. From-SVN: r140453
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index ef891e5..e9f315c 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1997,6 +1997,18 @@ remove_useless_stmts_1 (gimple_stmt_iterator *gsi, struct rus_data *data)
}
break;
+ case GIMPLE_CHANGE_DYNAMIC_TYPE:
+ /* If we do not optimize remove GIMPLE_CHANGE_DYNAMIC_TYPE as
+ expansion is confused about them and we only remove them
+ during alias computation otherwise. */
+ if (!optimize)
+ {
+ data->last_was_goto = false;
+ gsi_remove (gsi, false);
+ break;
+ }
+ /* Fallthru. */
+
default:
data->last_was_goto = false;
gsi_next (gsi);