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
/
gcc-torture-execute-pr68143_1.c
blob
6389840724e0c03631380496becd7cf62dd6c9b7
1
/*
2
pr68143_1.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#define NULL 0
8
9
struct
stuff
10
{
11
int
a
;
12
int
b
;
13
int
c
;
14
int
d
;
15
int
e
;
16
char
*
f
;
17
int
g
;
18
};
19
20
void
21
bar
(
struct
stuff
*
x
)
22
{
23
if
(
x
->
g
!=
2
)
24
ASSERT
(
0
);
25
}
26
27
void
28
testTortureExecute
(
void
)
29
{
30
struct
stuff x
= {
0
,
0
,
0
,
0
,
0
,
NULL
,
0
};
31
x
.
a
=
100
;
32
x
.
d
=
100
;
33
x
.
g
=
2
;
34
/* Struct should now look like {100, 0, 0, 100, 0, 0, 0, 2}. */
35
bar
(&
x
);
36
return
;
37
}