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

            Bug ID: 82157
           Summary: ICE on valid code at -O2 and -O3: cannot update SSA
                    form
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

$ gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 8.0.0 20170908 (experimental) [trunk revision 251906] (GCC)
$
$ gcctk -Os small.c; ./a.out
$ gcc-7.2.0 -O2 small.c; ./a.out
$
$ gcctk -O2 small.c
small.c: In function ‘ac’:
small.c:20:6: error: statement uses released SSA name:
 void ac ()
      ^~
# .MEM_25 = VDEF <.MEM_16>
j = 0;
The use of .MEM_16 should have been replaced
during GIMPLE pass: pre
small.c:20:6: internal compiler error: cannot update SSA form
0xd084e6 update_ssa(unsigned int)
        ../../gcc-source-trunk/gcc/tree-into-ssa.c:3301
0xe31579 execute
        ../../gcc-source-trunk/gcc/tree-ssa-pre.c:5108
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.
$


---------------------------------------------


int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y,
z;

int aa ()
{ 
  w = f < 0 || e >> f;
  while (z)
    h = i && (r && p) | ((l = p) == c % d);
  k = v + 1 < a;
  t = -(j < 1) * q;
  return u;
}

int ab ()
{ 
  for (j = 0; 1; j = 5)
    if (!s)
      return d;
}

void ac ()
{ 
  char ad = aa ();
  ab ();
  if (x)
    { 
      for (m = 0; m < 3; m = a)
        { 
          y = a && b;
          if (g)
            break;
        }
      n = j;
    }
  o = j & ad;
}

int main ()
{ 
  ac ();
  return 0;
}

Reply via email to