diff options
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 83e4ee6..f664ffe 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1701,8 +1701,9 @@ group_case_labels_stmt (gswitch *stmt) gcc_assert (base_case); base_bb = label_to_block (CASE_LABEL (base_case)); - /* Discard cases that have the same destination as the default case. */ - if (base_bb == default_bb) + /* Discard cases that have the same destination as the default case or + whose destiniation blocks have already been removed as unreachable. */ + if (base_bb == NULL || base_bb == default_bb) { i++; continue; |