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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr46076.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O2" } */
3
 
4
extern void link_error (void);
5
 
6
typedef unsigned char(*Calculable)(void);
7
 
8
static unsigned char one() { return 1; }
9
static unsigned char two() { return 2; }
10
 
11
static int
12
print(Calculable calculate)
13
{
14
  return calculate() + calculate() + 1;
15
}
16
 
17
int
18
main()
19
{
20
  /* Make sure we perform indirect inlining of one and two and optimize
21
     the result to a constant.  */
22
  if (print(one) != 3)
23
    link_error ();
24
  if (print(two) != 5)
25
    link_error ();
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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