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-2601.c.in
blob
f17f9ee17ecc949e7f58f6e64af329d48e03e7c9
1
/*
2
bug-2601.c
3
mem: __idata, __xdata,
4
*/
5
6
#include <testfwk.h>
7
8
unsigned char
{
mem
} *
p
;
9
unsigned char
{
mem
} *
a
;
10
signed char
b
;
11
12
void
f
(
void
)
13
{
14
p
=
a
+
b
;
15
}
16
17
void
g
(
void
)
18
{
19
p
=
b
+
a
;
20
}
21
22
unsigned char
{
mem
}
c
[
2
] = {
23
,
42
};
23
24
void
testBug
(
void
)
25
{
26
a
=
c
+
1
;
27
b
= -
1
;
28
29
p
=
0
;
30
f
();
31
ASSERT
(*
p
==
23
);
32
33
p
=
0
;
34
g
();
35
ASSERT
(*
p
==
23
);
36
}