Reverting merge from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / devirt-13.C
blob13fbaeea9c834e94278989967ded2bcac222fe0b
1 /* { dg-do run } */
2 /* Call to foo should be devirtualized because there are no derived types of A.  */
3 /* { dg-options "-O2 -fdump-ipa-cgraph -fdump-tree-ssa"  } */
4 namespace {
5 class A {
6 public:
7   virtual int foo(void)
9   return 0;
13 class A a, *b=&a;
14 main()
16   return b->foo();
19 /* { dg-final { scan-ipa-dump "Devirtualizing call"  "cgraph"  } } */
20 /* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "ssa"} } */
21 /* { dg-final { cleanup-ipa-dump "cgraph" } } */
22 /* { dg-final { cleanup-tree-dump "ssa" } } */