ICF is more strict about non-common function and var
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / devirt-13.C
blobb338a4c34c23d2d29f8a3ad4f4446b1a537cbaf0
1 /* { dg-do run } */
2 /* Call to foo should be devirtualized because there are no derived types of A.  */
3 /* { dg-options "-O2 -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-tree-dump-times "OBJ_TYPE_REF" 0 "ssa"} } */
20 /* { dg-final { cleanup-tree-dump "ssa" } } */