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
/
bug-3282.c
blob
6e07d6fd3e716ea2349fd8e60cca4456eada2882
1
/*
2
bug-3282.c. On stm8, the register allocator decided that one byte of a stack-pointer-relative address
3
should be rematerialized, and the other stored in a register. stm8 code generation can't handle that yet.
4
*/
5
6
#include <testfwk.h>
7
8
void
g1
(
void
);
9
10
void
f1
(
void
)
11
{
12
_Bool i
;
13
if
(&
i
)
14
g1
();
15
}
16
17
void
g2
(
void
);
18
19
void
f2
(
void
)
20
{
21
_Bool i
;
22
_Bool
*
volatile
p
= &
i
;
23
if
(
p
)
24
g2
();
25
}
26
27
void
28
testBug
(
void
)
29
{
30
f1
();
31
f2
();
32
}
33
34
int
g
;
35
36
void
g1
(
void
)
37
{
38
ASSERT
(++
g
==
1
);
39
}
40
41
void
g2
(
void
)
42
{
43
ASSERT
(++
g
==
2
);
44
}
45