struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20030218-1.c
bloba70c6bc0368c97f11f39afdb2dccc12b187085f8
1 /*
2 20030218-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* On H8, the predicate general_operand_src(op,mode) used to ignore
12 mode when op is a (mem (post_inc ...)). As a result, the pattern
13 for extendhisi2 was recognized as extendqisi2. */
15 short *q;
17 long
18 foo (short *p)
20 long b = *p;
21 q = p + 1;
22 return b;
25 void
26 testTortureExecute (void)
28 short a = 0xff00;
29 if (foo (&a) != (long) (short) 0xff00)
30 ASSERT (0);
31 return;