repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2002-05-10 David S. Miller <davem@redhat.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
931004-6.c
blob
6dca48f38ef5b0bdb91a01a3eed1683a103d2376
1
#include <stdarg.h>
2
3
struct
tiny
4
{
5
short
c
;
6
short
d
;
7
};
8
9
f
(
int
n
, ...)
10
{
11
struct
tiny x
;
12
int
i
;
13
14
va_list
ap
;
15
va_start
(
ap
,
n
);
16
for
(
i
=
0
;
i
<
n
;
i
++)
17
{
18
x
=
va_arg
(
ap
,
struct
tiny
);
19
if
(
x
.
c
!=
i
+
10
)
20
abort
();
21
if
(
x
.
d
!=
i
+
20
)
22
abort
();
23
}
24
{
25
long
x
=
va_arg
(
ap
,
long
);
26
if
(
x
!=
123
)
27
abort
();
28
}
29
va_end
(
ap
);
30
}
31
32
main
()
33
{
34
struct
tiny x
[
3
];
35
x
[
0
].
c
=
10
;
36
x
[
1
].
c
=
11
;
37
x
[
2
].
c
=
12
;
38
x
[
0
].
d
=
20
;
39
x
[
1
].
d
=
21
;
40
x
[
2
].
d
=
22
;
41
f
(
3
,
x
[
0
],
x
[
1
],
x
[
2
], (
long
)
123
);
42
exit
(
0
);
43
}
44