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

            Bug ID: 109327
           Summary: ICE on valid code at -O1 and above with
                    "-fno-tree-ccp": Segmentation fault
           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: ---

It appears to be a very recent regression. 

[554] % 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.1/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
--with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.1 20230329 (experimental) [master r13-6922-g91293ffb6af] (GCC)
[555] %
[555] % gcctk -O1 -fno-tree-ccp small.c
during GIMPLE pass: forwprop
small.c: In function ‘main’:
small.c:11:1: internal compiler error: Segmentation fault
   11 | }
      | ^
0xeeb24f crash_signal
        ../../gcc-trunk/gcc/toplev.cc:314
0xbab1a7 phi_nodes_ptr(basic_block_def*)
        ../../gcc-trunk/gcc/gimple.h:4684
0xbab1a7 gsi_start_phis(basic_block_def*)
        ../../gcc-trunk/gcc/gimple-iterator.cc:935
0xbab1a7 gsi_for_stmt(gimple*)
        ../../gcc-trunk/gcc/gimple-iterator.cc:620
0x10314f3 execute
        ../../gcc-trunk/gcc/tree-ssa-forwprop.cc:4070
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.
[556] %
[556] % cat small.c
int a;
void b(int c) {}
int main() {
  int d = 0, *e = &a;
  if (d) {
    int *f = e;
    while (a)
      b(e != f);
  }
  return 0;
}

Reply via email to