struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3740.c
blob92578288a0c9f4891b2954ecd2438bb70ac856cf
1 /** bug-3740.c : A bug in code generation for storing 0 into global vairables.
2 */
4 #include <testfwk.h>
6 #pragma disable_warning 85
8 unsigned char some_param;
9 unsigned char some_var;
11 unsigned char some_param;
12 unsigned char some_var;
13 unsigned char some_func(unsigned char value);
15 void f(void) {
16 unsigned char some_return_value = some_func(some_param);
17 some_var = 0;
18 if (some_return_value == 0x10) {
19 some_var = 1;
24 void
25 testBug(void)
27 f();
28 ASSERT (some_var);
31 unsigned char some_func(unsigned char value)
33 return 0x10;