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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |7.5.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-07
      Known to fail|                            |8.1.0

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Reduced testcase:
int n;

void qux (int a){}
int baz (void)
{
  return -1;
}

__attribute__ ((returns_twice)) int
bar (int b)
{
  if (n != 0)
    {
      switch (b) {
          default:  return n + b;
          case 0:
          case 2:;
      }
      if (n == 2)
        return 0;
    }
    __builtin_unreachable();
}
void
foo (void)
{
  qux (n);
  bar (baz ());
}
-------- CUT -----
Only -O3 is needed to produce the ICE with the above testcase.
And it was working in GCC 7.5.0 with the above one and started to fail in GCC
8.1.0.

Reply via email to