https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127033
Bug ID: 127033
Summary: ICE on valid code at -O{2,3} with
"-fallow-store-data-races -fno-tree-loop-optimize" 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/K5fcas99K
Note:
- fails: trunk
- works: 16.2 and earlier
[517] % 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++,lto --disable-werror
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260823 (experimental) [master r17-1628-gd1c12591336] (GCC)
[518] %
[518] % gcctk -O2 -fallow-store-data-races -fno-tree-loop-optimize small.c
small.c: In function ‘main’:
small.c:4:5: error: definition in block 8 does not dominate use in block 10
4 | int main() {
| ^~~~
for SSA_NAME: _33 in statement:
vect_f__lsm.36_40 = PHI <vect_f__lsm.35_22(2), _33(10)>
PHI argument
_33
for PHI node
vect_f__lsm.36_40 = PHI <vect_f__lsm.35_22(2), _33(10)>
during GIMPLE pass: slp
small.c:4:5: internal compiler error: verify_ssa failed
0x280270b internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0x14ba00f verify_ssa(bool, bool)
../../gcc-trunk/gcc/tree-ssa.cc:1226
0x10cabd4 execute_function_todo
../../gcc-trunk/gcc/passes.cc:2107
0x10cb32e 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 -dumpdir a- -dumpbase small.c -dumpbase-ext .c -mtune=generic
-march=x86-64 -O2 -fallow-store-data-races -fno-tree-loop-optimize -o
/tmp/ccW1bNPl.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.
[519] %
[519] % cat small.c
int b, c, d;
char e, f[2][2], *g, *h, **i;
static char j() { return !e; }
int main() {
char (*l)[2] = &f[1];
do {
i = &g;
if (b)
return 0;
e = d ? d : 1;
h = *l + 1;
*h = 2 + e;
l = &f[0];
*i = *l;
l = &f[1];
if (c)
return 0;
*g = -e;
*i = &f[0][1];
*g = *h;
g = *l;
} while (j());
*g = e + 1;
return 0;
}