c++: prev declared hidden tmpl friend inst [PR112288]
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / inlinehint-6.c
blob1f3be641c6d26c6f831b879ebb0224b72e0a0cd1
1 /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
2 /* { dg-add-options bind_pic_locally } */
4 #define size_t long long int
6 struct A
8 size_t f1, f2, f3, f4;
9 };
10 struct C
12 struct A a;
13 size_t b;
15 struct C x;
17 __attribute__((hot)) struct C callee (struct A *a, struct C *c)
19 c->a=(*a);
21 if((c->b + 7) & 17)
23 c->a.f1 = c->a.f2 + c->a.f1;
24 c->a.f2 = c->a.f3 - c->a.f2;
25 c->a.f3 = c->a.f2 + c->a.f3;
26 c->a.f4 = c->a.f2 - c->a.f4;
27 c->b = c->a.f2;
30 return *c;
33 __attribute__((hot)) struct C caller (size_t d, size_t e, size_t f, size_t g, struct C *c)
35 struct A a;
36 a.f1 = 1 + d;
37 a.f2 = e;
38 a.f3 = 12 + f;
39 a.f4 = 68 + g;
40 if (c->b > 0)
41 return callee (&a, c);
42 else
43 return *c;
46 /* { dg-final { scan-ipa-dump "known_hot" "inline" } } */