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.target/] [i386/] [pr12329.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target ilp32 } */
3
/* { dg-options "-O2" } */
4
 
5
extern void abort (void);
6
 
7
int test_nested1 (int i)
8
{
9
  int __attribute__ ((__noinline__, __regparm__(3))) foo(int j, int k, int l)
10
  {
11
    return i + j + k + l;
12
  }
13
 
14
  return foo (i, i+1, i+2);
15
}
16
 
17
int test_nested2 (int i)
18
{
19
  int x;
20
 
21
  int __attribute__ ((__noinline__, __regparm__(3))) foo(int j, int k, int l)
22
  {
23
    return i + j + k + l;
24
  }
25
 
26
  x = foo (i+3, i+1, i+2);
27
  if (x != (4*i + 6))
28
    abort ();
29
 
30
  return x;
31
}
32
 
33
int
34
main ()
35
{
36
  int i = test_nested1 (3);
37
 
38
  if (i != 15)
39
    abort ();
40
 
41
  i = test_nested2 (4);
42
 
43
  if (i != 22)
44
    abort ();
45
 
46
  return 0;
47
}

powered by: WebSVN 2.1.0

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