Pass name cleanups
[official-gcc.git] / gcc / testsuite / g++.dg / tree-prof / indir-call-prof.C
blob91874a30e045e147e1977a1d780f793d05ee5b8e
1 /* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */
3 struct A {
4   A () {}
6   virtual int AA (void)
7   { return 0; }
9 };
11 struct B : public A {
12   B () {}
14   virtual int AA (void)
15   { return 1; }
18 void * __attribute__((noinline,noclone)) wrap (void *p) { return p; }
19 int
20 main (void)
22   A a;
23   B b;
24   
25   A* p;
27   p = (A *)wrap ((void *)&a);
28   p->AA ();
30   p = (B *)wrap ((void *)&b);
31   p->AA ();
32   
33   return 0;
36 /* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* AA transformation on insn" "profile" } } */
37 /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized" } } */
38 /* { dg-final-use { cleanup-tree-dump "optimized" } } */
39 /* { dg-final-use { cleanup-ipa-dump "profile" } } */