view gcc/testsuite/g++.dg/ipa/pr93621.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 2b5abeee2509
children
line wrap: on
line source

// PR ipa/93621
// { dg-do compile }
// { dg-options "-O3 --param ipa-cp-eval-threshold=100 --param large-function-growth=60 --param large-function-insns=10 --param uninlined-thunk-insns=1000" }

typedef enum { X } E;
struct A {
  virtual void bar ();
};
struct B {
  virtual E fn (const char *, int, int *) = 0;
};
struct C : A, B {
  E fn (const char *, int, int *);
  void fn2 ();
  B *foo;
};
void C::fn2 () {
  if (!foo)
    return;
  foo->fn (0, 0, 0);
}
E
C::fn (const char *, int, int *)
{
  fn2 ();
  foo = 0;
  fn (0, 0, 0);
  return X;
}