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/] [pr34099-2.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
int test1 (int b, int c)
2
{
3
  char x;
4
  if (b)
5
    return x / c;
6
  else
7
    return 1;
8
}
9
int test2 (int b, int c)
10
{
11
  int x;
12
  if (b)
13
    return x * c;
14
  else
15
    return 1;
16
}
17
int test3 (int b, int c)
18
{
19
  int x;
20
  if (b)
21
    return x % c;
22
  else
23
    return 1;
24
}
25
int test4 (int b, int c)
26
{
27
  char x;
28
  if (b)
29
    return x == c;
30
  else
31
    return 1;
32
}
33
 
34
extern void abort (void);
35
int main()
36
{
37
  if (test1(1, 1000) != 0)
38
    abort ();
39
  if (test2(1, 0) != 0)
40
    abort ();
41
  if (test3(1, 1) != 0)
42
    abort ();
43
  if (test4(1, 1000) != 0)
44
    abort ();
45
  return 0;
46
}
47
 

powered by: WebSVN 2.1.0

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