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
2018-04-09 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
union-2.c
blob
edc8a7abf114b98668ba41a98cb1dd5f1f7e90ea
1
/* This used to segfault on SPARC 64-bit at runtime because
2
the stack pointer was clobbered by the function call. */
3
4
/* { dg-do run } */
5
6
#include <stdarg.h>
7
8
union
U
9
{
10
long
l1
[
2
];
11
};
12
13
union
U u
;
14
15
void
foo
(
int
z
, ...)
16
{
17
int
i
;
18
va_list
ap
;
19
va_start
(
ap
,
z
);
20
i
=
va_arg
(
ap
,
int
);
21
va_end
(
ap
);
22
}
23
24
int
main
(
void
)
25
{
26
foo
(
1
,
1
,
1
,
1
,
1
,
u
);
27
return
0
;
28
}