https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122079
Bug ID: 122079
Summary: ICE on valid code at -O{s,2,3} with
"-fno-tree-loop-im" on x86_64-linux-gnu: in
compute_antic, at tree-ssa-pre.cc:2449
Product: gcc
Version: unknown
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/54asTv48Y
Note:
- fails: trunk
- works: 15.2 and earlier
[647] % 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/16.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 16.0.0 20250927 (experimental) (GCC)
[648] %
[648] % gcctk -O3 -c small.c
[649] % gcctk -O3 -c -fno-tree-loop-im small.c
during GIMPLE pass: pre
small.c: In function āeā:
small.c:3:6: internal compiler error: in compute_antic, at tree-ssa-pre.cc:2449
3 | void e(int f[][2]) {
| ^
0x25727ab internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:786
0xa0a1ce fancy_abort(char const*, int, char const*)
../../gcc-trunk/gcc/diagnostics/context.cc:1803
0x8ec794 compute_antic
../../gcc-trunk/gcc/tree-ssa-pre.cc:2449
0x8ec794 execute
../../gcc-trunk/gcc/tree-ssa-pre.cc:4476
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.
[650] %
[650] % cat small.c
int a, b, c;
void d(int[]);
void e(int f[][2]) {
g:
b = f[0][1];
if (c)
goto h;
i:
if (a)
goto g;
if (f[1][1])
goto j;
h:
if (f[1][1])
goto i;
goto k;
j:
b--;
if (b + f[0][1])
goto i;
k:
int l[] = {f[0][1]};
d(l);
}