repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
bug2435941.c
blob
6887100a8e3b28b4406073abf17b630a031c604b
1
/*
2
bug 2435941
3
*/
4
5
#include <testfwk.h>
6
#include <stdint.h>
7
8
uint32_t
sleep_timer_get
(
void
)
9
{
10
return
0x12345678
;
11
}
12
13
int32_t
remaining
;
14
uint32_t
updated
;
15
uint32_t
now
;
16
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
21
{
22
while
(
1
)
23
{
24
now
=
sleep_timer_get
();
25
26
remaining
-= (
now
-
updated
) &
0xFF
;
27
updated
=
now
;
28
}
29
}
30
31
void
32
testBug
(
void
)
33
{
34
ASSERT
(
1
);
35
}