struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / using.c.in
blob30af98f1badf4dc79f9b9a8ed972b48e01e27d1a
1 /** Test register bank allocation for the "using" keyword.
2 using: no_proto, impl, both
3 */
4 #include <testfwk.h>
6 #define _{using}
8 #if defined (__SDCC_mcs51) && defined (__SDCC_MODEL_SMALL)
10 #ifndef _no_proto
11 #if defined (_both)
12 void my_isr (void) __interrupt (1) __using (1);
13 #else
14 void my_isr (void) __interrupt (1);
15 #endif
16 #endif
18 __data char array[8];
20 void
21 my_isr (void) __interrupt (1) __using (1)
23 array[array[0]] = 1; //generate some register pressure
26 #endif
28 void
29 testUsing (void)
31 #if defined (__SDCC_mcs51) && defined (__SDCC_MODEL_SMALL)
32 ASSERT ((unsigned char)(&array[0]) >= 0x10);
33 ASSERT ((unsigned char)&__numTests >= 0x10);
34 #endif