PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / iinline-2.c
blob117818d164597cc64ba7f6d59dd4aac1caffdb9a
1 /* Verify that simple indirect calls are inlined even without early
2 inlining.. */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -c -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
6 extern void non_existent(int);
8 int __attribute__ ((noinline,noclone)) get_input(void)
10 return 1;
13 static void hooray ()
15 non_existent (1);
18 static void hip2 (void (*g)())
20 non_existent (2);
21 g ();
24 static void hip1 (void (*f)(void (*)()), void (*g)())
26 non_existent (2);
27 f (g);
30 int main (int argc, int *argv[])
32 int i;
34 for (i = 0; i < get_input (); i++)
35 hip1 (hip2, hooray);
36 return 0;
39 /* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in main" "inline" } } */
40 /* { dg-final { scan-ipa-dump "hip2\[^\\n\]*inline copy in main" "inline" } } */
41 /* { dg-final { cleanup-ipa-dump "inline" } } */