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
/
bug3444293.c
blob
f5e118cce6ef02af827eaa4d51b34f5774e8cb0f
1
/*
2
bug3444293.c
3
*/
4
5
#include <testfwk.h>
6
7
void
__code
*
s
[
3
];
8
9
void
f
(
void
)
10
{
11
s
[
0
] =
0
;
12
s
[
1
] =
0
;
// Access to s is off by one byte here.
13
}
14
15
void
testBug
(
void
)
16
{
17
s
[
0
] = (
void
__code
*)(
0xffff
);
18
s
[
1
] = (
void
__code
*)(
0xffff
);
19
f
();
20
ASSERT
(!
s
[
0
]);
21
ASSERT
(!
s
[
1
]);
22
}
23