PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / remref-0.c
blob6073c028a98619340e9f3ac24001b5320234d0b8
1 /* Verify that indirect inlining machinery can remove references to functions
2 passed as parameters that are never used. */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized" } */
6 extern int __attribute__ ((noinline, noclone, used))
7 stuff (int i)
9 return 0;
12 static void hooray ()
14 stuff (1);
17 static int hiphip (void (*f)())
19 return stuff (2);
22 int main (void)
24 return hiphip (hooray);
27 /* { dg-final { scan-ipa-dump "ipa-prop: Removed a reference" "inline" } } */
28 /* { dg-final { scan-tree-dump-not "hooray" "optimized" } } */