mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
aac8c550c9
commit
fb9cb5369d
|
|
@ -1,3 +1,8 @@
|
||||||
|
2018-08-29 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* tree-switch-conversion.c (switch_conversion::expand):
|
||||||
|
Strenghten assumption about gswitch statements.
|
||||||
|
|
||||||
2018-08-29 Richard Biener <rguenther@suse.de>
|
2018-08-29 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/87117
|
PR tree-optimization/87117
|
||||||
|
|
|
||||||
|
|
@ -913,14 +913,7 @@ switch_conversion::expand (gswitch *swtch)
|
||||||
/* Group case labels so that we get the right results from the heuristics
|
/* Group case labels so that we get the right results from the heuristics
|
||||||
that decide on the code generation approach for this switch. */
|
that decide on the code generation approach for this switch. */
|
||||||
m_cfg_altered |= group_case_labels_stmt (swtch);
|
m_cfg_altered |= group_case_labels_stmt (swtch);
|
||||||
|
gcc_assert (gimple_switch_num_labels (swtch) >= 2);
|
||||||
/* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
collect (swtch);
|
collect (swtch);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue