c++: prev declared hidden tmpl friend inst [PR112288]
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipcp-agg-12.c
blob57a94aca04990dd6716cba9fa1243f756dfa0da2
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details --param=ipa-cp-eval-threshold=2" } */
4 struct S
6 int a, b, c;
7 };
9 int __attribute__((noinline)) foo (int i, struct S s);
10 int __attribute__((noinline)) bar (int i, struct S s);
11 int __attribute__((noinline)) baz (int i, struct S s);
14 int __attribute__((noinline))
15 bar (int i, struct S s)
17 return baz (i, s);
20 int __attribute__((noinline))
21 baz (int i, struct S s)
23 return foo (i, s);
26 int __attribute__((noinline))
27 foo (int i, struct S s)
29 if (i == 2)
30 return 0;
31 else
32 return s.b * s.b + bar (i - 1, s);
35 volatile int g;
37 void entry (void)
39 struct S s;
40 s.b = 4;
41 g = bar (g, s);
45 void entry2 (void)
47 struct S s;
48 s.b = 6;
49 g = baz (g, s);
53 /* { dg-final { scan-ipa-dump-times "adding an extra caller" 2 "cp" { xfail { hppa*-*-hpux* && { ! lp64 } } } } } */