Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / bug2435941.c
blob6887100a8e3b28b4406073abf17b630a031c604b
1 /*
2 bug 2435941
3 */
5 #include <testfwk.h>
6 #include <stdint.h>
8 uint32_t sleep_timer_get(void)
10 return 0x12345678;
13 int32_t remaining;
14 uint32_t updated;
15 uint32_t now;
17 // no need to call this, it generates compiler error:
18 // error 9: FATAL Compiler Internal Error
19 static void
20 do_test (void) __reentrant
22 while (1)
24 now = sleep_timer_get();
26 remaining -= (now - updated) & 0xFF;
27 updated = now;
31 void
32 testBug (void)
34 ASSERT(1);