https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122492
Bug ID: 122492
Summary: ICE: in make_ssa_name_fn, at tree-ssanames.cc:355
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: qingren2hxb at gmail dot com
Target Milestone: ---
https://godbolt.org/z/E6q5zasEo
The following code was mutated from gcc.dg/uninit-pr90394-1-gimple.c.
However, directly compiling gcc.dg/uninit-pr90394-1-gimple.c with gcc will not
produce the error shown below.
===============================
# gcc -x c
unsigned int __GIMPLE (ssa,startwith("uninit1"))
foo (unsigned int v)
{
unsigned int undef[1];
unsigned int pred2;
unsigned int pred1;
int b[1];
__BB(2):
pred2 = v_4(D) & 5u;
if (pred2 != 0u)
goto __BB3;
else
goto __BB4;
__BB(3):
undef[0] = 8u;
goto __BB4;
__BB(4):
undef[0] = __PHI (__BB2: undef[0], __BB3: undef[0]);
pred1 = v_4(D) & 3u;
if (pred1 != 0u)
goto __BB5;
else
goto __BB6;
__BB(5):
goto __BB7;
__BB(6):
goto __BB7;
__BB(7):
return 0;
}
===============================
<source>:1:14: error: '__GIMPLE' only valid with '-fgimple'
1 | unsigned int __GIMPLE (ssa,startwith("uninit1"))
| ^~~~~~~~
<source>: In function 'foo':
<source>:36:1: internal compiler error: in make_ssa_name_fn, at
tree-ssanames.cc:355
36 | }
| ^
0x2ea6b35 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
???:0
0x2ebdb06 internal_error(char const*, ...)
???:0
0xf5795e fancy_abort(char const*, int, char const*)
???:0
0x17e20db create_phi_node(tree_node*, basic_block_def*)
???:0
0x1029498 c_parser_parse_gimple_body(c_parser*, char*, c_declspec_il,
profile_count)
???:0
0x101ff6e c_parse_file()
???:0
0x109f139 c_common_parse_file()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1