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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [flatten-1.c] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options -O2 } */
3
 
4
/* Basic tests for flatten attribute, check we end up
5
   with only the flattened function bodies.  */
6
 
7
static int foobar(int i);
8
static int bar(int i);
9
 
10
int __attribute__((flatten)) leaf0a(int i)
11
{
12
  return bar(i);
13
}
14
int __attribute__((flatten)) leaf0b(int i)
15
{
16
  return foobar(i);
17
}
18
int __attribute__((flatten)) leaf1(int i)
19
{
20
  return bar(foobar(i));
21
}
22
int __attribute__((flatten)) leaf2(int i)
23
{
24
  int j;
25
  j = foobar(i);
26
  return bar(j);
27
}
28
 
29
static int foobar(int i)
30
{
31
  return i-1;
32
}
33
static int bar(int i)
34
{
35
  return i + foobar(i);
36
}
37
 
38
 
39
static int gloobar(int i)
40
{
41
  return i*5+1;
42
}
43
static int floobar(int i)
44
{
45
  return gloobar(i);
46
}
47
int __attribute__((flatten)) leaf3(int i)
48
{
49
  int j;
50
  j = floobar(i);
51
  j += floobar(i);
52
  return j;
53
}
54
 
55
/* { dg-final { scan-assembler-not "bar\[: \t\n\]" } } */

powered by: WebSVN 2.1.0

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