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-868103.c.in
blob
bec1cbcc707e17af88ce78fa8e0d3b7fb9437eb7
1
/** Bug 868103 tests.
2
3
storage1: __near, __far, __code,
4
storage2: __near, __far,
5
*/
6
7
#ifndef STORAGE1
8
#define STORAGE1 {storage1}
9
#endif
10
11
#ifndef STORAGE2
12
#define STORAGE2 {storage2}
13
#endif
14
15
#include <testfwk.h>
16
17
typedef
struct
{
18
STORAGE1
char
*
bar
[
2
];
19
}
foo
;
20
21
STORAGE1
char
c
=
'x'
;
22
STORAGE2 foo f
;
23
24
void
25
testBug868103
(
void
)
26
{
27
f
.
bar
[
1
] = &
c
;
28
ASSERT
(
f
.
bar
[
1
] == &
c
);
29
}