Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/iinline-cstagg-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-sra -fno-ipa-cp" } */
3
4 typedef struct S
5 {
6 int add_offset;
7 int (*call)(int);
8 } S;
9
10 static int
11 bar (const S *f, int x)
12 {
13 x = f->call(x);
14 return x;
15 }
16
17 static int
18 thisisthetarget (int x)
19 {
20 return x * x;
21 }
22
23 static const S s = {16, thisisthetarget};
24
25 int
26 outerfunction (int x)
27 {
28 return bar (&s, x);
29 }
30
31 int
32 obfuscate (int x)
33 {
34 return bar ((S *) 0, x);
35 }
36
37 /* { dg-final { scan-ipa-dump "thisisthetarget\[^\\n\]*inline copy in outerfunction" "inline" } } */