c++: prev declared hidden tmpl friend inst [PR112288]
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipcp-agg-9.c
blobc69a285b287812ce4f1859db81bf4de73eaa7cf6
1 /* Verify that IPA-CP can make edges direct based on aggregate contents. */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fdump-ipa-cp -fdump-ipa-inline" } */
5 struct S
7 int i;
8 void (*f)(struct S *);
9 unsigned u;
12 struct U
14 struct U *next;
15 struct S s;
16 short a[8];
19 extern void non_existent(struct S *p, int);
21 static void hooray1 (struct S *p)
23 non_existent (p, 1);
26 static __attribute__ ((noinline))
27 void hiphip1 (struct S *p)
29 p->f (p);
32 int test1 (void)
34 struct S s;
35 s.i = 1234;
36 s.f = hooray1;
37 s.u = 1001;
38 hiphip1 (&s);
39 return 0;
42 /* { dg-final { scan-ipa-dump "ipa-prop: Discovered an indirect call to a known target" "cp" } } */
43 /* { dg-final { scan-ipa-dump "hooray1\[^\\n\]*inline copy in hiphip1" "inline" } } */