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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [930929-1.c] - Blame information for rev 711

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

Line No. Rev Author Line
1 688 jeremybenn
sub1 (i)
2
     int i;
3
{
4
  return i - (5 - i);
5
}
6
 
7
sub2 (i)
8
     int i;
9
{
10
  return i + (5 + i);
11
}
12
 
13
sub3 (i)
14
     int i;
15
{
16
  return i - (5 + i);
17
}
18
 
19
sub4 (i)
20
     int i;
21
{
22
  return i + (5 - i);
23
}
24
 
25
main()
26
{
27
  if (sub1 (20) != 35)
28
    abort ();
29
  if (sub2 (20) != 45)
30
    abort ();
31
  if (sub3 (20) != -5)
32
    abort ();
33
  if (sub4 (20) != 5)
34
    abort ();
35
  exit (0);
36
}

powered by: WebSVN 2.1.0

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