struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2580.c.in
blob3641cc6dc3abc83a60ced55bcd1d9ff88a10ef52
1 /** bug-2569.c
2 An error in code generation for assignment of register parameters to global variables
3 in __z88dk_fastcall functions when using --reserve-regs-iy
5 type: char, int, long
6 */
8 #include <testfwk.h>
10 unsigned {type} game_menu_sel;
11 unsigned {type} s_lin1;
13 void game_menu_back(unsigned {type} f_start) __z88dk_fastcall
15 game_menu_sel = 0;
16 s_lin1 = f_start;
19 void testBug(void)
21 game_menu_back(0x55aaa5a5ul);
22 ASSERT(game_menu_sel == 0);
23 ASSERT(s_lin1 == (unsigned {type})0x55aaa5a5ul);