aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
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);