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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Renamed/reformatted:

struct A { void foo () { a = 1; } int a = 0; };
struct B : virtual A {};
typedef void (A::*C) ();

__attribute__((noipa))
void foo (C x, B *y)
{
  (y->*x) ();
}

int
main ()
{
  B b;
  foo (&A::foo, &b);
  if (b.a != 1)
    __builtin_abort ();
}

Note, r15-4595 has been backported to 14 branch in r14-10839, so it also a
regression from 14.2 to 14.3.

Reply via email to