https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126926
Bug ID: 126926
Summary: ICE on valid code at -O{2,3} with "-fno-tree-fre
-fno-code-hoisting -fno-tree-dominator-opts
-fno-tree-forwprop -fno-tree-ccp -fno-tree-pre" 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/35Texjnnc
Note:
- fails: trunk
- works: 16.2 and earlier
[562] % 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 20260818 (experimental) (GCC)
[563] %
[563] % gcctk -c -O2 -fno-tree-fre -fno-code-hoisting -fno-tree-dominator-opts
-fno-tree-forwprop -fno-tree-ccp -fno-tree-pre small.c
small.c: In function ‘b’:
small.c:2:6: error: definition in block 2 follows the use
2 | void b() {
| ^
for SSA_NAME: c_13 in statement:
_17 = VEC_PERM_EXPR <c_13, c_13, { 1, 1 }>;
during GIMPLE pass: slp
small.c:2:6: internal compiler error: verify_ssa failed
0x283053b internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0x14c470a verify_ssa(bool, bool)
../../gcc-trunk/gcc/tree-ssa.cc:1226
0x10d8a94 execute_function_todo
../../gcc-trunk/gcc/passes.cc:2107
0x10d91cb 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
-O2 -fno-tree-fre -fno-code-hoisting -fno-tree-dominator-opts
-fno-tree-forwprop -fno-tree-ccp -fno-tree-pre -o /tmp/ccuHvCYq.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.
[564] %
[564] % cat small.c
float a;
void b() {
__attribute__((__vector_size__(8))) float c;
c[1] = a + 0;
c[0] = 0 + a;
a = 0 * c[1] + 2 * c[1];
}