PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / flatten-3.c
bloba1edb910e9de27ea2a1c0a7bdde73a149fc775b6
1 /* { dg-do compile } */
2 /* { dg-options -O2 } */
4 extern void do_something_usefull();
5 /* Check that we finish compiling even if instructed to
6 flatten a cyclic callgraph. Verify we correctly
7 flatten with another function marked flatten in the
8 callgraph. */
10 void __attribute__((flatten)) direct(void)
12 direct();
16 void __attribute__((flatten)) indirect(void);
17 static void indirect1(void)
19 indirect();
21 void __attribute__((flatten)) indirect(void)
23 indirect1();
27 void __attribute__((flatten)) doubleindirect(void);
28 static void doubleindirect2(void)
30 doubleindirect();
31 do_something_usefull ();
33 static void doubleindirect1(void)
35 doubleindirect2();
37 void __attribute__((flatten)) doubleindirect(void)
39 doubleindirect1();
43 static void subcycle1(void);
44 static void subcycle2(void)
46 subcycle1();
47 do_something_usefull ();
49 static void subcycle1(void)
51 subcycle2();
53 void __attribute__((flatten)) subcycle(void)
55 subcycle1();
59 static void doublesubcycle1(void);
60 static void doublesubcycle2(void);
61 static void doublesubcycle3(void)
63 doublesubcycle1();
64 do_something_usefull ();
66 static void doublesubcycle2(void)
68 doublesubcycle3();
70 static void doublesubcycle1(void)
72 doublesubcycle2();
74 void __attribute__((flatten)) doublesubcycle(void)
76 doublesubcycle1();
79 /* { dg-final { scan-assembler "cycle\[123\]\[: \t\n\]" } } */