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-920908-1.c
blob
f6902e898c1da152b1cce7c43bd79c6d1389820d
1
/*
2
920908-1.c from the execute part of the gcc torture suite.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
// TODO: Enable when sdcc supports returning struct!
12
#if 0
13
/* REPRODUCED:RUN:SIGNAL MACHINE:mips OPTIONS: */
14
15
#include <stdarg.h>
16
17
typedef
struct
{
int
A
;}
T
;
18
19
T
f
(
int
x
,...)
20
{
21
va_list
ap
;
22
T X
;
23
va_start
(
ap
,
x
);
24
X
=
va_arg
(
ap
,
T
);
25
if
(
X
.
A
!=
10
)
abort
();
26
X
=
va_arg
(
ap
,
T
);
27
if
(
X
.
A
!=
20
)
abort
();
28
va_end
(
ap
);
29
return
X
;
30
}
31
#endif
32
33
void
34
testTortureExecute
(
void
)
35
{
36
#if 0
37
T X
,
Y
;
38
int
i
;
39
X
.
A
=
10
;
40
Y
.
A
=
20
;
41
f
(
2
,
X
,
Y
);
42
return
;
43
#endif
44
}
45