diff options
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 2986e31..293b24e 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1204,6 +1204,7 @@ remove_useless_stmts_cond (tree *stmt_p, struct rus_data *data) else_has_label = data->has_label; data->has_label = save_has_label | then_has_label | else_has_label; + fold_stmt (stmt_p); then_clause = COND_EXPR_THEN (*stmt_p); else_clause = COND_EXPR_ELSE (*stmt_p); cond = COND_EXPR_COND (*stmt_p); @@ -1551,11 +1552,13 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) break; case RETURN_EXPR: + fold_stmt (tp); data->last_goto = NULL; data->may_branch = true; break; case CALL_EXPR: + fold_stmt (tp); data->last_goto = NULL; notice_special_calls (t); update_call_expr_flags (t); @@ -1565,6 +1568,7 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) case MODIFY_EXPR: data->last_goto = NULL; + fold_stmt (tp); op = get_call_expr_in (t); if (op) { @@ -1600,6 +1604,10 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) } } break; + case SWITCH_EXPR: + fold_stmt (tp); + data->last_goto = NULL; + break; default: data->last_goto = NULL; |