Merge from mainline.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / flatten-2.c
blobc8ec3fdda315f9a4f520f1904854ac7f4a9c70ee
1 /* { dg-do compile } */
2 /* { dg-options -O2 } */
4 /* Check that we finish compiling even if instructed to
5 flatten a cyclic callgraph. Verify we correctly
6 flatten with another function marked flatten in the
7 callgraph. */
9 void __attribute__((flatten)) direct(void)
11 direct();
15 void __attribute__((flatten)) indirect(void);
16 static void indirect1(void)
18 indirect();
20 void __attribute__((flatten)) indirect(void)
22 indirect1();
26 void __attribute__((flatten)) doubleindirect(void);
27 static void doubleindirect2(void)
29 doubleindirect();
31 static void doubleindirect1(void)
33 doubleindirect2();
35 void __attribute__((flatten)) doubleindirect(void)
37 doubleindirect1();
41 static void subcycle1(void);
42 static void subcycle2(void)
44 subcycle1();
46 static void subcycle1(void)
48 subcycle2();
50 void __attribute__((flatten)) subcycle(void)
52 subcycle1();
56 static void doublesubcycle1(void);
57 static void doublesubcycle2(void);
58 static void doublesubcycle3(void)
60 doublesubcycle1();
62 static void doublesubcycle2(void)
64 doublesubcycle3();
66 static void doublesubcycle1(void)
68 doublesubcycle2();
70 void __attribute__((flatten)) doublesubcycle(void)
72 doublesubcycle1();
75 /* { dg-final { scan-assembler "cycle\[123\]\[: \t\n\]" } } */
76 /* { dg-final { scan-assembler-not "indirect\[12\]\[: \t\n\]" } } */