1 /* Verify that simple virtual calls are inlined even without early
2 inlining, even when a typecast to an ancestor is involved along the
4 /* { dg-do run { target nonpic } } */
5 /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
7 extern "C" void abort (void);
13 virtual int foo (int i);
19 virtual int foo (int i);
25 virtual int foo (int i);
43 int __attribute__ ((noinline,noclone)) get_input(void)
48 static int middleman_1 (class A *obj, int i)
53 static int middleman_2 (class B *obj, int i)
55 return middleman_1 (obj, i);
58 int main (int argc, char *argv[])
63 for (i = 0; i < get_input (); i++)
64 if (middleman_2 (&b, get_input ()) != 3)
69 /* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */
70 /* { dg-final { cleanup-ipa-dump "inline" } } */