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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr45695.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* PR rtl-optimization/45695 */
2
 
3
extern void abort (void);
4
 
5
__attribute__((noinline)) void
6
g (int x)
7
{
8
  asm volatile ("" : "+r" (x));
9
}
10
 
11
__attribute__((noinline)) int
12
f (int a, int b, int d)
13
{
14
  int r = -1;
15
  b += d;
16
  if (d == a)
17
    r = b - d;
18
  g (b);
19
  return r;
20
}
21
 
22
int
23
main (void)
24
{
25
  int l;
26
  asm ("" : "=r" (l) : "0" (0));
27
  if (f (l + 0, l + 1, l + 4) != -1)
28
    abort ();
29
  if (f (l + 4, l + 1, l + 4) != 1)
30
    abort ();
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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