1 /* Verify that simple virtual calls on an object refrence are
2 converted to simple calls by ipa-cp. */
4 /* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */
6 extern "C" void abort (void);
12 virtual float distraction (float f);
13 virtual int foo (int i);
19 virtual int foo (int i);
25 virtual int foo (int i);
28 float A::distraction (float f)
49 static int middleman (class A &obj, int i)
54 int __attribute__ ((noinline,noclone)) get_input(void)
59 int main (int argc, char *argv[])
62 if (middleman (b, get_input ()) != 3)
67 /* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::foo" "cp" } } */
68 /* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */