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
10 void __attribute__((flatten
)) direct(void)
16 void __attribute__((flatten
)) indirect(void);
17 static void indirect1(void)
21 void __attribute__((flatten
)) indirect(void)
27 void __attribute__((flatten
)) doubleindirect(void);
28 static void doubleindirect2(void)
31 do_something_usefull ();
33 static void doubleindirect1(void)
37 void __attribute__((flatten
)) doubleindirect(void)
43 static void subcycle1(void);
44 static void subcycle2(void)
47 do_something_usefull ();
49 static void subcycle1(void)
53 void __attribute__((flatten
)) subcycle(void)
59 static void doublesubcycle1(void);
60 static void doublesubcycle2(void);
61 static void doublesubcycle3(void)
64 do_something_usefull ();
66 static void doublesubcycle2(void)
70 static void doublesubcycle1(void)
74 void __attribute__((flatten
)) doublesubcycle(void)
79 /* { dg-final { scan-assembler "cycle\[123\]\[: \t\n\]" } } */