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-20140828-1.c
blobc2c3975e08419f2222d712c92f6a3b460f6ce1ca
1 /*
2 20140828-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 short *f(short *a, int b, int *d);
13 short *f(short *a, int b, int *d)
15 short c = *a;
16 a++;
17 c = b << c;
18 *d = c;
19 return a;
22 void
23 testTortureExecute (void)
25 int d;
26 short a[2];
27 a[0] = 0;
28 if (f(a, 1, &d) != &a[1])
29 ASSERT (0);
30 if (d != 1)
31 ASSERT (0);