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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [flatten-3.c] - Blame information for rev 298

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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