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
/
bug3482753.c
blob
13932d5f8ba73234d5d2f3909a10f1f6c4be89b0
1
/*
2
bug3482753.c
3
*/
4
5
#include <testfwk.h>
6
7
struct
{
char
a
;}
x
;
8
volatile
char
d
=
7
;
9
10
int
f
(
void
)
11
{
12
char
t
=
d
;
13
14
x
.
a
=
t
;
15
t
=
x
.
a
+
2
;
16
d
=
t
;
17
t
=
x
.
a
+
3
;
/* bug: x.a was optimized to t, despite redefinition of t */
18
return
t
;
19
}
20
21
void
testBug
(
void
)
22
{
23
ASSERT
(
f
() ==
10
);
24
}