struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2235.c
blobacb032d2404e2f5f99b5db0f6e5fa06edaa33109
1 /* bug-2235.c
2 */
4 #include <testfwk.h>
6 #ifdef __SDCC_mcs51
7 __sfr32 __at (0xFCFBFAF9) SFR32;
8 #else
9 volatile unsigned long SFR32;
10 #endif
12 void foo(unsigned long u1, unsigned long u2, unsigned long u3)
14 u1;
15 u2;
16 u3;
19 /* This failed to compile due to iTemps getting SFR storage class */
20 void testBug2235(void)
22 unsigned long U1, U2, U3;
24 U1 = 0xABCDEF01 + SFR32;
25 U2 = U1 + SFR32;
26 U3 = U2 + SFR32;
27 foo(U1, U2, U3);
28 ASSERT(1);