aarch64: testsuite: Explicitly add -mlittle-endian to vget_low_2.c
[official-gcc.git] / gcc / testsuite / g++.dg / tree-prof / indir-call-prof.C
blob1f7404600ed98e02dcde3a23eb8174c5e0bb9013
1 /* { dg-options "-O2 -fdump-tree-optimized-blocks-details -fdump-ipa-profile-optimized -fdump-ipa-afdo-optimized" } */
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   int i;
29   for (i = 0; i < 10000000; i++)
30     {
31       p = (A *)wrap ((void *)&a);
32       p->AA ();
34       p = (B *)wrap ((void *)&b);
35       p->AA ();
36     }
37   
38   return 0;
41 /* { dg-final-use-not-autofdo { scan-ipa-dump "Indirect call -> direct call.* AA .will resolve by ipa-profile" "profile" } } */
42 /* { dg-final-use-autofdo { scan-ipa-dump "Indirect call -> direct call.* AA .will resolve by ipa-profile" "afdo" } } */
43 /* { dg-final-use-not-autofdo { scan-tree-dump-not "Invalid sum" "optimized" } } */