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.c-torture/] [execute/] [20050124-1.c] - Blame information for rev 301

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR rtl-optimization/19579 */
2
 
3
extern void abort (void);
4
 
5
int
6
foo (int i, int j)
7
{
8
  int k = i + 1;
9
 
10
  if (j)
11
    {
12
      if (k > 0)
13
        k++;
14
      else if (k < 0)
15
        k--;
16
    }
17
 
18
  return k;
19
}
20
 
21
int
22
main (void)
23
{
24
  if (foo (-2, 0) != -1)
25
    abort ();
26
  if (foo (-1, 0) != 0)
27
    abort ();
28
  if (foo (0, 0) != 1)
29
    abort ();
30
  if (foo (1, 0) != 2)
31
    abort ();
32
  if (foo (-2, 1) != -2)
33
    abort ();
34
  if (foo (-1, 1) != 0)
35
    abort ();
36
  if (foo (0, 1) != 2)
37
    abort ();
38
  if (foo (1, 1) != 3)
39
    abort ();
40
  return 0;
41
}

powered by: WebSVN 2.1.0

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