Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20020103-1.c
blobdd4a2d586e3129d71c45a49e4757658fcebb9490
1 /*
2 20020103-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* On h8300 port, the following used to be broken with -mh or -ms. */
13 unsigned long
14 foo (unsigned long a)
16 return a ^ 0x0000ffff;
19 unsigned long
20 bar (unsigned long a)
22 return a ^ 0xffff0000;
25 void
26 testTortureExecute (void)
28 if (foo (0) != 0x0000ffff)
29 ASSERT (0);
31 if (bar (0) != 0xffff0000)
32 ASSERT (0);