2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20030120-1.c
blob0ac0ecf7025879e1f8bbcf856e204499c89c2d86
1 /* On H8/300 port, NOTICE_UPDATE_CC had a bug that causes the final
2 pass to remove test insns that should be kept. */
4 unsigned short
5 test1 (unsigned short w)
7 if ((w & 0xff00) == 0)
9 if (w == 0)
10 w = 2;
12 return w;
15 unsigned long
16 test2 (unsigned long w)
18 if ((w & 0xffff0000) == 0)
20 if (w == 0)
21 w = 2;
23 return w;
26 int
27 test3 (unsigned short a)
29 if (a & 1)
30 return 1;
31 else if (a)
32 return 1;
33 else
34 return 0;
37 int
38 main ()
40 if (test1 (1) != 1)
41 abort ();
43 if (test2 (1) != 1)
44 abort ();
46 if (test3 (2) != 1)
47 abort ();
49 exit (0);