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

            Bug ID: 69067
           Summary: [6 Regression] ICE in get_def_bb_for_const, at
                    graphite-isl-ast-to-gimple.c:1995
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

lto1 binary from at least gcc-6.0.0-alpha20151220 and gcc-6.0.0-alpha20151227
ICEs when compiling the following reduced snippet w/ -O[12]
-floop-nest-optimize -flto:

int a1, c1, cr, kt;
int aa[2];

int
ce()
{
  while (a1 < 1) {
    int g8;
    for (g8 = 0; g8 < 3; ++g8)
      if (c1 != 0)
        cr = aa[a1 * 2] = kt;
    for (c1 = 0; c1 < 2; ++c1)
      aa[c1] = cr;
    ++a1;
  }
  return 0;
}

int
main(void)
{
  return ce(aa);
}

% gcc-6.0.0-alpha20151227 -O1 -floop-nest-optimize -flto z1xrkum2.c 
z1xrkum2.c: In function 'ce':
z1xrkum2.c:5:1: internal compiler error: in get_def_bb_for_const, at
graphite-isl-ast-to-gimple.c:1995
 ce()
 ^

I guess, LTO infrastructure is really only a trigger here.

Reply via email to