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 inline void* operator new(__SIZE_TYPE__ s, void* buf) throw() {
11 struct B:A {virtual int foo () {return 2;}};
13 void dostuff(struct A *);
27 static_cast<B*>(a)->~B();
39 /* One invocation is A::foo () other is B::foo () even though the type is destroyed and rebuilt in test() */
40 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target\[^\\n\]*A::foo" 1 "inline" } } */
41 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target\[^\\n\]*B::foo" 1 "inline" } } */