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 bar(const S * f,int x)11bar (const S *f, int x) 12 { 13 x = f->call(x); 14 return x; 15 } 16 17 static int thisisthetarget(int x)18thisisthetarget (int x) 19 { 20 return x * x; 21 } 22 23 static const S s = {16, thisisthetarget}; 24 25 int outerfunction(int x)26outerfunction (int x) 27 { 28 return bar (&s, x); 29 } 30 31 int obfuscate(int x)32obfuscate (int x) 33 { 34 return bar ((S *) 0, x); 35 } 36 37 /* { dg-final { scan-ipa-dump "thisisthetarget\[^\\n\]*inline copy in outerfunction" "inline" } } */ 38