1 /* Verify that we either do not do any devirtualization or correctly
2 spot that foo changes the dynamic type of the passed object. */
5 /* { dg-options "-O3" } */
7 extern "C" void abort (void);
8 extern "C" void *malloc(__SIZE_TYPE__);
10 inline void* operator new(__SIZE_TYPE__, void* __p) throw() { return __p;}
21 virtual ~B() { if (x == 1) abort (); x = 1; }
24 void __attribute__((noinline,noclone)) foo (void *p)
26 B *b = reinterpret_cast<B *>(p);
33 void *p = __builtin_malloc (sizeof (B));
36 reinterpret_cast<A *>(p)->~A();