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
/
bug1426356.c
blob
01caa6ae3eb5ed2e3c76e11c8aa9b07b1002e014
1
/*
2
bug1426356.c
3
*/
4
5
#include <testfwk.h>
6
7
const union
pu
{
8
unsigned char
t1
;
9
unsigned char
t2
;
10
}
tst
[
2
] = {{
1
}, {
2
}};
11
12
void
13
test_1426356
(
void
)
14
{
15
ASSERT
(
tst
[
0
].
t1
==
1
);
16
ASSERT
(
tst
[
0
].
t2
==
1
);
17
ASSERT
(
tst
[
1
].
t1
==
2
);
18
ASSERT
(
tst
[
1
].
t2
==
2
);
19
}