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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly cleaned up testcase (so it doesn't use ununinitialized vars).  -O2 is
enough.
The ICE is on:
2443          /* Make sure the successor is the next node in the path.  */
2444          gcc_assert (i + 1 == n_region
2445                  || region_copy[i + 1] == single_succ_edge (bb)->dest);

i is 0, n_region is 5.

int foo (void);

void
bar (int a, int b, int c)
{
  while (!a)
    {
      c = foo ();
      if (c == 7)
    c = b;
      switch (c)
    {
    case 1:
      a = b++;
      if (b)
        b = 1;
    }
    }
}

Reply via email to