1 /* Verify that ipa-cp correctly detects the dynamic type of an object
2 under construction when doing devirtualization. */
4 /* { dg-options "-O3 -fno-inline" } */
6 extern "C" void abort (void);
18 virtual float bar (float z);
26 virtual int foo (int i);
29 class B : public Distraction, public A
33 virtual int foo (int i);
39 virtual int foo (int i);
43 float Distraction::bar (float z)
64 int __attribute__ ((noinline,noclone)) get_input(void)
69 static int __attribute__ ((noinline))
70 middleman (class A *obj, int i)
75 static void __attribute__ ((noinline))
78 if (a->foo (get_input ()) != 3)
82 inline void __attribute__ ((always_inline)) sth1 (B *b)
87 inline __attribute__ ((always_inline)) A::A()
89 if (middleman (this, get_input ()) != 2)
93 B::B() : Distraction(), A()
103 int main (int argc, char *argv[])
107 for (i = 0; i < 10; i++)