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-pr29156.c
blob
cece2a7f0e503753ec4e2fe06b4ceacecd666dc8
1
/*
2
pr29156.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
struct
test1
12
{
13
int
a
;
14
int
b
;
15
};
16
struct
test2
17
{
18
float
d
;
19
struct
test1 sub
;
20
};
21
22
int
global
;
23
24
int
bla
(
struct
test1
*
xa
,
struct
test2
*
xb
)
25
{
26
global
=
1
;
27
xb
->
sub
.
a
=
1
;
28
xa
->
a
=
8
;
29
return
xb
->
sub
.
a
;
30
}
31
32
void
33
testTortureExecute
(
void
)
34
{
35
struct
test2 pom
;
36
37
if
(
bla
(&
pom
.
sub
, &
pom
) !=
8
)
38
ASSERT
(
0
);
39
40
return
;
41
}
42