1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining" } */
4 virtual int foo(){return 1;}
7 virtual int foo(){return 2;}
11 virtual int foo(){return 3;}
14 virtual int foo(){return 4;}
15 void callfoo(){foo();}
27 static_cast<B*>(a)->callfoo();
31 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target\[^\\n\]*__builtin_unreachable" 1 "inline" } } */