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-pr39120.c
blob
bf4d0179e98af932ef803c9e40d4d8fc39397d75
1
/*
2
pr39120.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
#if 0
12
SDCC urrently cannot
return
aggregates TODO
:
Enable later
.
13
struct
X
{
int
*
p
; }
x
;
14
15
struct
X
16
foo
(
int
*
p
) {
struct
X x
;
x
.
p
=
p
;
return
x
; }
17
18
void
19
bar
() { *
x
.
p
=
1
; }
20
#endif
21
22
void
23
testTortureExecute
(
void
)
24
{
25
#if 0
26
int
i
=
0
;
27
x
=
foo
(&
i
);
28
bar
();
29
if
(
i
!=
1
)
30
ASSERT
(
0
);
31
return
;
32
#endif
33
}