Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / bug2077267.c
blob59e4d59c0360d2825aa64cc620ba5e2f6bbc7d36
1 /*
2 bug 2077267
3 */
5 #include <testfwk.h>
7 #ifndef __SDCC
8 #define __critical
9 #endif
10 #if defined(__SDCC_pdk14) || defined(__SDCC_pdk15)
11 #define __critical // __critical not implemented for pdk14
12 #endif
14 void bug(char* x)
16 *x = *x + 1;
19 void
20 testBug(void)
22 char x = 1;
24 bug(&x);
26 __critical {
27 bug(&x);
30 ASSERT (x == 3);