2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / remref-1a.c
blob9db2bd61927664743f80a8fb897517c7c3ee96aa
1 /* Verify that indirect inlining can also remove references of the functions it
2 discovers calls for. */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized" } */
6 int global;
8 void __attribute__ ((noinline, noclone, used))
9 stuff (int i)
11 global = i;
14 static void hooray ()
16 stuff (1);
19 static void hiphip (void (*f)())
21 stuff (2);
22 f ();
25 int main (void)
27 hiphip (hooray);
28 return 0;
31 /* { dg-final { scan-ipa-dump "ipa-prop: Removed a reference" "inline" } } */
32 /* { dg-final { scan-tree-dump-not "hooray" "optimized" } } */
33 /* { dg-final { cleanup-ipa-dump "inline" } } */
34 /* { dg-final { cleanup-tree-dump "optimized" } } */