https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96150
Bug ID: 96150
Summary: [10/11 Regression] ICE in analyze_function_body on
switch since r10-3199
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
Target Milestone: ---
The following testcase at -O2 (-O1 and higher) since
r10-3199-g351e7c3b5fbd45bde3efb601f7fee9a31c4f2063
in
rh1855742.i: In function ‘foo’:
rh1855742.i:23:1: internal compiler error: Segmentation fault
23 | }
| ^
0x1300ff4 crash_signal
../../gcc/toplev.c:328
0xf34e3e analyze_function_body
../../gcc/ipa-fnsummary.c:2802
0xf35974 compute_fn_summary(cgraph_node*, bool)
../../gcc/ipa-fnsummary.c:2974
0xf39486 inline_analyze_function(cgraph_node*)
../../gcc/ipa-fnsummary.c:4078
0xf39663 ipa_fn_summary_generate
../../gcc/ipa-fnsummary.c:4121
0x1182288 execute_ipa_summary_passes(ipa_opt_pass_d*)
../../gcc/passes.c:2191
0xbca2f3 ipa_passes
../../gcc/cgraphunit.c:2646
0xbca696 symbol_table::compile()
../../gcc/cgraphunit.c:2756
0xbcac42 symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:3003
struct S { unsigned j : 3; };
int k, l, m;
void
foo (struct S x)
{
while (l != 5)
switch (x.j)
{
case 1:
case 3:
case 4:
case 6:
case 2:
case 5:
l = m;
case 7:
case 0:
k = 0;
default:
break;
}
}