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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12 Regression] ICE:     |[9/10/11/12 Regression]
                   |tree check: expected class  |ICE: tree check: expected
                   |'type', have 'exceptional'  |class 'type', have
                   |(error_mark) in             |'exceptional' (error_mark)
                   |useless_type_conversion_p,  |in
                   |at gimple-expr.c:88         |useless_type_conversion_p,
                   |                            |at gimple-expr.c:88
   Target Milestone|---                         |9.5

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Testcase which shows this is an older bug:
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;
    }
}

void
foo (void)
{
  qux (n);
  bar (baz ());
}

Reply via email to