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

            Bug ID: 101151
           Summary: ICE at -O1 and above on x86_64-linux-gnu: verify_ssa
                    failed
           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 recent regression.

[511] % 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/12.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-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210621 (experimental) [master revision
edf0c3ffb59:30584177106:12bdd39755a25d237b7776153cbe03e171396fc5] (GCC)
[512] %
[512] % gcctk -O0 small.c; ./a.out
[513] %
[513] % gcctk -O1 small.c
small.c: In function ‘main’:
small.c:2:5: error: stmt with wrong VUSE
    2 | int main() {
      |     ^~~~
# VUSE <.MEM_8(D)>
b.0_1 = b;
expected .MEM_6
during GIMPLE pass: sink
small.c:2:5: internal compiler error: verify_ssa failed
0x1038aeb verify_ssa(bool, bool)
        ../../gcc-trunk/gcc/tree-ssa.c:1214
0xcb0437 execute_function_todo
        ../../gcc-trunk/gcc/passes.c:2049
0xcb11e2 execute_todo
        ../../gcc-trunk/gcc/passes.c:2096
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[514] %
[514] % cat small.c
int a, *b = &a, c, d;
int main() {
  *b;
  if (a) {
  L1:
    a = 0;
  L2:
    if (d) {
      while (b)
        ;
      goto L1;
    }
  }
  if (c)
    goto L2;
  return 0;
}

Reply via email to