1 /* Verify that virtual call inlining does not pick a wrong method when
2 there is a user defined ancestor in an object. */
3 /* { dg-do run { target nonpic } } */
4 /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
6 extern "C" void abort (void);
12 virtual int foo (int i);
19 virtual int foo (int i);
32 int middleman (class A *obj, int i)
37 int __attribute__ ((noinline,noclone)) get_input(void)
42 int main (int argc, char *argv[])
45 int i, j = get_input ();
47 for (i = 0; i < j; i++)
48 if ((middleman (&b, j) + 100 * middleman (&b.confusion, j)) != 203)
53 /* { dg-final { scan-ipa-dump "A::foo\[^\\n\]*inline copy in int main" "inline" } } */
54 /* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */