1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining" } */
4 virtual int foo () {return 1;}
5 void wrapfoo () {foo();}
8 struct B:A {virtual int foo () {return 2;}};
10 void dostuff(struct A *);
26 /* Here one invocation of foo is while type is in construction, while other is not.
27 Check that we handle that. */
29 /* { dg-final { scan-ipa-dump "Second type is base of first" "inline" } } */
30 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target\[^\\n\]*A::foo" 1 "inline" } } */
31 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target\[^\\n\]*B::foo" 1 "inline" } } */