diff options
Diffstat (limited to 'gcc/tree-switch-conversion.c')
-rw-r--r-- | gcc/tree-switch-conversion.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index 1f543b2..64169a6 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -2419,8 +2419,13 @@ pass_lower_switch<O0>::execute (function *fun) FOR_EACH_BB_FN (bb, fun) { gimple *stmt = last_stmt (bb); - if (stmt && gimple_code (stmt) == GIMPLE_SWITCH) - switch_statements.safe_push (stmt); + gswitch *swtch; + if (stmt && (swtch = dyn_cast<gswitch *> (stmt))) + { + if (!O0) + group_case_labels_stmt (swtch); + switch_statements.safe_push (swtch); + } } for (unsigned i = 0; i < switch_statements.length (); i++) |