blob: a70c6bc0368c97f11f39afdb2dccc12b187085f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
20030218-1.c from the execute part of the gcc torture tests.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#endif
/* On H8, the predicate general_operand_src(op,mode) used to ignore
mode when op is a (mem (post_inc ...)). As a result, the pattern
for extendhisi2 was recognized as extendqisi2. */
short *q;
long
foo (short *p)
{
long b = *p;
q = p + 1;
return b;
}
void
testTortureExecute (void)
{
short a = 0xff00;
if (foo (&a) != (long) (short) 0xff00)
ASSERT (0);
return;
}
|