Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20020103-1.c

raw
1 /* On h8300 port, the following used to be broken with -mh or -ms. */
2
3 extern void abort (void);
4 extern void exit (int);
5
6 unsigned long
7 foo (unsigned long a)
8 {
9 return a ^ 0x0000ffff;
10 }
11
12 unsigned long
13 bar (unsigned long a)
14 {
15 return a ^ 0xffff0000;
16 }
17
18 int
19 main ()
20 {
21 if (foo (0) != 0x0000ffff)
22 abort ();
23
24 if (bar (0) != 0xffff0000)
25 abort ();
26
27 exit (0);
28 }