OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [flatten-2.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { dg-do compile } */
2
/* { dg-options -O2 } */
3
 
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.  */
8
 
9
void __attribute__((flatten)) direct(void)
10
{
11
  direct();
12
}
13
 
14
 
15
void __attribute__((flatten)) indirect(void);
16
static void indirect1(void)
17
{
18
  indirect();
19
}
20
void __attribute__((flatten)) indirect(void)
21
{
22
  indirect1();
23
}
24
 
25
 
26
void __attribute__((flatten)) doubleindirect(void);
27
static void doubleindirect2(void)
28
{
29
  doubleindirect();
30
}
31
static void doubleindirect1(void)
32
{
33
  doubleindirect2();
34
}
35
void __attribute__((flatten)) doubleindirect(void)
36
{
37
  doubleindirect1();
38
}
39
 
40
 
41
static void subcycle1(void);
42
static void subcycle2(void)
43
{
44
  subcycle1();
45
}
46
static void subcycle1(void)
47
{
48
  subcycle2();
49
}
50
void __attribute__((flatten)) subcycle(void)
51
{
52
  subcycle1();
53
}
54
 
55
 
56
static void doublesubcycle1(void);
57
static void doublesubcycle2(void);
58
static void doublesubcycle3(void)
59
{
60
  doublesubcycle1();
61
}
62
static void doublesubcycle2(void)
63
{
64
  doublesubcycle3();
65
}
66
static void doublesubcycle1(void)
67
{
68
  doublesubcycle2();
69
}
70
void __attribute__((flatten)) doublesubcycle(void)
71
{
72
  doublesubcycle1();
73
}
74
 
75
/* { dg-final { scan-assembler "cycle\[123\]\[: \t\n\]" } } */
76
/* { dg-final { scan-assembler-not "indirect\[12\]\[: \t\n\]" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.