https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125692
Bug ID: 125692
Summary: ICE at -O3 with -g on x86_64-linux-gnu: verify_ssa
failed
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/ne9Kxe3oW
Note:
- fails: 16.1 and trunk
- works: 15.2 and earlier
[521] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260609 (experimental) (GCC)
[522] %
[522] % gcctk -O3 -c small.c
[523] % gcctk -O3 -g -c small.c
small.c: In function ‘h’:
small.c:10:6: error: definition in block 5 does not dominate use in block 9
10 | void h() {
| ^
for SSA_NAME: _7 in statement:
# DEBUG i => _7
during GIMPLE pass: unswitch
small.c:10:6: internal compiler error: verify_ssa failed
0x265e5ab internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0x149bb4a verify_ssa(bool, bool)
../../gcc-trunk/gcc/tree-ssa.cc:1226
0x10b9494 execute_function_todo
../../gcc-trunk/gcc/passes.cc:2107
0x10b9bcb execute_todo
../../gcc-trunk/gcc/passes.cc:2152
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -I /usr/local/include -I /local/suz-local/software/local/include
-imultiarch x86_64-linux-gnu -iprefix
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
small.c -quiet -dumpbase small.c -dumpbase-ext .c -mtune=generic -march=x86-64
-g -O3 -o /tmp/ccyLJxM7.s
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.
[524] %
[524] % cat small.c
int *a, b;
int f(int g) {
int c = 1;
while (1) {
if (c - g)
break;
c = -1;
}
}
void h() {
int c = 0, i;
d:
a = &c;
*a = c - 1;
if (b)
goto d;
*a = c - 20002849452162;
if (f(c))
goto d;
i = c;
}