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
/
bug1670148.c
blob
80f1442ae668e0466c7421f84c40ef43c28723c6
1
/*
2
bug 1670148.c
3
*/
4
5
#include <testfwk.h>
6
7
// no need to call this, it generates compiler error for xstack-auto
8
// error 9: FATAL Compiler Internal Error
9
struct
str
{
10
long
aa
;
11
long
bb
;
12
};
13
14
struct
str
*
v1
;
15
16
void
foo
(
void
)
17
{
18
struct
str v2
;
19
struct
str loc
;
20
21
v2
.
aa
=
0
;
22
loc
.
bb
=
v1
->
bb
;
23
loc
.
aa
=
v1
->
aa
-
v2
.
aa
;
24
25
loc
.
bb
+=
0
;
26
}
27
28
void
29
testBug
(
void
)
30
{
31
ASSERT
(
1
);
32
}