diff options
author | Martin Liska <mliska@suse.cz> | 2018-08-29 10:35:09 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-08-29 08:35:09 +0000 |
commit | fb9cb5369dff9afae40dec2224e485625c425a67 (patch) | |
tree | ec63834d0b2a625f88339d66b1face5fb6378b49 /gcc/tree-switch-conversion.c | |
parent | aac8c550c9390ac4808246451989f0655ed17c7e (diff) | |
download | gcc-fb9cb5369dff9afae40dec2224e485625c425a67.zip gcc-fb9cb5369dff9afae40dec2224e485625c425a67.tar.gz gcc-fb9cb5369dff9afae40dec2224e485625c425a67.tar.bz2 |
Strenghten assumption about gswitch statements.
2018-08-29 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (switch_conversion::expand):
Strenghten assumption about gswitch statements.
From-SVN: r263947
Diffstat (limited to 'gcc/tree-switch-conversion.c')
-rw-r--r-- | gcc/tree-switch-conversion.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index a31ff94..7e4f34c 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -913,14 +913,7 @@ switch_conversion::expand (gswitch *swtch) /* Group case labels so that we get the right results from the heuristics that decide on the code generation approach for this switch. */ m_cfg_altered |= group_case_labels_stmt (swtch); - - /* If this switch is now a degenerate case with only a default label, - there is nothing left for us to do. */ - if (gimple_switch_num_labels (swtch) < 2) - { - m_reason = "switch is a degenerate case"; - return; - } + gcc_assert (gimple_switch_num_labels (swtch) >= 2); collect (swtch); |