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
/
bug1838000.c
blob
c506c32d5f49f5d6a7ede38a10591382e95fe663
1
/*
2
bug 1838000
3
*/
4
5
#include <testfwk.h>
6
7
typedef
struct
{
char
b
:
1
; }
t
;
8
t glbl
= {
0
};
9
t _STATMEM
*
gp
= &
glbl
;
10
11
void
func
(
char
_AUTOMEM
*
p
)
12
{
13
*
p
++ =
gp
->
b
?
'A'
:
'B'
;
14
*
p
=
'C'
;
15
}
16
17
void
18
testBug
(
void
)
19
{
20
char
x
[
2
];
21
func
(
x
);
22
ASSERT
(
x
[
0
]==
'B'
);
23
}