1 /*
2 20030218-1.c from the execute part of the gcc torture tests.
3 */
4
5 #include <testfwk.h>
6
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10
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. */
14
15 short *q;
16
17 long
foo(short * p)18 foo (short *p)
19 {
20 long b = *p;
21 q = p + 1;
22 return b;
23 }
24
25 void
testTortureExecute(void)26 testTortureExecute (void)
27 {
28 short a = 0xff00;
29 if (foo (&a) != (long) (short) 0xff00)
30 ASSERT (0);
31 return;
32 }
33
34