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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr48837.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR tree-optimization/48837 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
 
5
void abort (void);
6
 
7
__attribute__((noinline))
8
int baz(void)
9
{
10
  return 1;
11
}
12
 
13
inline const int *bar(const int *a, const int *b)
14
{
15
 return *a ? a : b;
16
}
17
 
18
int foo(int a, int b)
19
{
20
   return a || b ? baz() : foo(*bar(&a, &b), 1) + foo(1, 0);
21
}
22
 
23
int main(void)
24
{
25
 if (foo(0, 0) != 2)
26
   abort();
27
 
28
 return 0;
29
}
30
 

powered by: WebSVN 2.1.0

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