struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3379.c
blobc2ea476f07b674e8f22c685821869588ccd8983c
1 /* bug-3368.c
2 A bug in stm8 codegen affecting tail-call optimization of calls to functions taing a single 8-bit parameter from functions that put exactly 1 byte of local variables on the stack.
3 */
5 #include <testfwk.h>
7 #include <stdbool.h>
9 volatile unsigned char a;
11 static inline void ta(void)
13 a |= 0x1;
16 static void sub_func(bool my_sub_flag)
18 ASSERT (my_sub_flag);
21 static void sdcc42_bug(bool my_flag)
23 if (my_flag)
24 ta();
25 else
26 ta();
28 sub_func(true);
31 void testBug(void)
33 sdcc42_bug(false);