PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / remref-0.c
bloba9e434a86d3f70a67373d4260fab6cd713d3378e
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" } } */
29 /* { dg-final { cleanup-ipa-dump "inline" } } */
30 /* { dg-final { cleanup-tree-dump "optimized" } } */