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
/
bug3004918.c
blob
601ea4b6fed72fd66d7a0040ba21df3de7845feb
1
/*
2
bug3004918.c
3
*/
4
5
#include <testfwk.h>
6
#include <stdint.h>
7
8
#ifdef __SDCC_STACK_AUTO
9
#define XDATA
10
#else
11
#define XDATA __xdata
12
#endif
13
14
uint16_t
foo
(
uint16_t
a
,
XDATA
uint8_t
b
)
15
{
16
return
a
+
b
;
17
}
18
19
volatile
uint8_t
p
=
0x56
;
20
volatile
uint8_t
q
=
0x78
;
21
22
void
testBug
(
void
)
23
{
24
ASSERT
(
foo
(
p
+
0x1234
,
q
) ==
0x1302
);
25
}