struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3229.c
blobcecb3c839fcad0130f9d60fab2436a7e30336ad7
1 /*
2 bug-3229.c
3 A bug in code generation for __z88dk_callee functions returning long long
4 */
6 #include <testfwk.h>
8 long long f0(void) __z88dk_callee
10 return 0xa5;
13 long long f1(int i) __z88dk_callee
15 return 0xa5 + i;
18 long long f4(long long l) __z88dk_callee
20 return 0xa5 + l;
23 void
24 testBug (void)
26 volatile long long l = 0xaa55;
27 ASSERT (f0() == 0xa5);
28 ASSERT (f1(1) == 0xa6);
29 ASSERT (f4(2) == 0xa7);
30 ASSERT (l == 0xaa55);