https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106194

            Bug ID: 106194
           Summary: ICE on valid code at -O3 on x86_64-linux-gnu: in
                    check_loop_closed_ssa_def, at
                    tree-ssa-loop-manip.cc:717
           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: ---

[555] % 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/13.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers
--enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20220704 (experimental) [master r13-1463-gce8dbe7d834] (GCC) 
[556] % 
[556] % gcctk -O3 small.c
during GIMPLE pass: unswitch
small.c: In function ‘main’:
small.c:3:5: internal compiler error: in check_loop_closed_ssa_def, at
tree-ssa-loop-manip.cc:717
    3 | int main() {
      |     ^~~~
0x76e5ab check_loop_closed_ssa_def
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:717
0x1057144 check_loop_closed_ssa_bb
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:731
0x10583e6 verify_loop_closed_ssa(bool, loop*)
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:767
0x10583e6 verify_loop_closed_ssa(bool, loop*)
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:751
0xde6954 execute_function_todo
        ../../gcc-trunk/gcc/passes.cc:2109
0xde6d9b execute_todo
        ../../gcc-trunk/gcc/passes.cc:2145
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.
[557] % 
[557] % cat small.c
int printf(const char *, ...);
int a;
int main() {
  int c = 0, d;
  for (; a; a--)
    for (d = 0; d < 4; d++)
      while (a > 2U)
        c++;
  printf("%d", c);
  return 0;
}

Reply via email to