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

            Bug ID: 71272
           Summary: [7 Regression] internal compiler error: in operator[],
                    through tree-ssa-threadupdate.c:1981
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
                CC: law at gcc dot gnu.org
  Target Milestone: ---

The below testcases ICEs for me on aarch64-none-elf:
int a, b, c, d;

int
f1 (int p1, int p2)
{
  return p1 - p2;
}

void
f2 (short p1, short p2)
{
  for (;;)
    {
      if (5 < (1 ^ p2))
        for (; a;)
          for (;;)
            {
              b = 0xE7BC92A3EDA01CD8 < (d = p2) || (0, 0);
              break;
            }
      if (p1)
        break;
      p2 = 5;
    }
}

void
f3 (int x)
{
  int tmp = -2L;
  c = f1 (90, x != 10);
  f2 (c, tmp);
}

mycrash.c: In function 'f3':
mycrash.c:28:1: internal compiler error: in operator[], at vec.h:727
 f3 (int x)
 ^~
0xd1cf28 vec<jump_thread_edge*, va_heap, vl_embed>::operator[](unsigned int)
        $SRC/gcc/vec.h:727
0xd1cf28 vec<jump_thread_edge*, va_heap, vl_ptr>::operator[](unsigned int)
        $SRC/gcc/vec.h:1211
0xd1cf28 mark_threaded_blocks
        $SRC/gcc/tree-ssa-threadupdate.c:1981
0xd1cf28 thread_through_all_blocks(bool)
        $SRC/gcc/tree-ssa-threadupdate.c:2529
0xdaae55 finalize_jump_threads
        $SRC/gcc/tree-vrp.c:10157
0xdaae55 execute_vrp
        $SRC/gcc/tree-vrp.c:10311
0xdaae55 execute
        $SRC/gcc/tree-vrp.c:10380
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

This appeared very recently, so I'm suspecting r236653 either caused it or
exposed some other issue.

Reply via email to