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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030120-1.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* On H8/300 port, NOTICE_UPDATE_CC had a bug that causes the final
2
   pass to remove test insns that should be kept.  */
3
 
4
unsigned short
5
test1 (unsigned short w)
6
{
7
  if ((w & 0xff00) == 0)
8
    {
9
      if (w == 0)
10
        w = 2;
11
    }
12
  return w;
13
}
14
 
15
unsigned long
16
test2 (unsigned long w)
17
{
18
  if ((w & 0xffff0000) == 0)
19
    {
20
      if (w == 0)
21
        w = 2;
22
    }
23
  return w;
24
}
25
 
26
int
27
test3 (unsigned short a)
28
{
29
  if (a & 1)
30
    return 1;
31
  else if (a)
32
    return 1;
33
  else
34
    return 0;
35
}
36
 
37
int
38
main ()
39
{
40
  if (test1 (1) != 1)
41
    abort ();
42
 
43
  if (test2 (1) != 1)
44
    abort ();
45
 
46
  if (test3 (2) != 1)
47
    abort ();
48
 
49
  exit (0);
50
}

powered by: WebSVN 2.1.0

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