https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126250
--- Comment #6 from Roger Sayle <roger at nextmovesoftware dot com> ---
Interesting... If I put the switch statement in f4 in brackets (it's odd to see
a switch without brackets) I can move the ICE to trigger in var-tracking.
...
switch (f4_v7) { // insert "{"
case 9009:
case 1:
g9 = 0;
} // and insert "}"
...
results in
during RTL pass: vartrack
dump file: /app/output.s-example.c.358r.vartrack
<source>: In function 'f21':
<source>:37:1: internal compiler error: in loc_cmp, at var-tracking.cc:3446
37 | }
| ^
0x27b18e8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x27a652b internal_error(char const*, ...)
???:0
0xa365f0 fancy_abort(char const*, int, char const*)
???:0
0x15f81dc canonicalize_loc_order_check(variable**, dataflow_set*)
???:0
0x16079c9 void hash_table<variable_hasher, false,
xcallocator>::traverse<dataflow_set*,
&(canonicalize_loc_order_check(variable**, dataflow_set*))>(dataflow_set*)
???:0
Perhaps the keywords should be changed to ICE-on-invalid, but it's odd that
we're not generating any kind of error or diagnostic for whatever is causing
RTL data-flow analysis so much trouble.