This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/65735] [5 Regression] ICE (in duplicate_thread_path, at tree-ssa-threadupdate.c)


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;
    }
    }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]