https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111043
--- Comment #9 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
Another at -O2 and -O3:
[545] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/14.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 14.0.0 20231101 (experimental) (GCC)
[546] %
[546] % gcctk -O2 small.c
during GIMPLE pass: ch_vect
small.c: In function ‘main’:
small.c:21:5: internal compiler error: in adjust_loop_info_after_peeling, at
tree-ssa-loop-ivcanon.cc:1069
21 | int main() {
| ^~~~
0x8736bd adjust_loop_info_after_peeling(loop*, int, bool)
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1069
0x1287a14 copy_headers
../../gcc-trunk/gcc/tree-ssa-loop-ch.cc:1108
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.
[547] %
[547] % cat small.c
int a, *b, c, *d, e, f;
static void g() {
int h;
while (1)
while (1) {
int *i = 0;
h = 0;
while (c)
*d = 1;
if (e)
break;
if ((h ^ f) > f)
for (; e < 1; e++)
;
for (a = 0; a < 1; a++)
if (*i)
break;
b = &h;
}
}
int main() {
if (a)
g();
return 0;
}