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
PR tree-optimization/84740
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
lto
/
20090706-1_0.c
blob
7877fd350d7da3a222e4406a7de9a82970af0409
1
#include <stdarg.h>
2
3
extern
void
abort
(
void
);
4
5
void
foo
(
int
size
, ...)
6
{
7
struct
8
{
9
struct
10
{
11
char
x
[
size
];
12
}
e
;
13
unsigned
r
;
14
}
d
;
15
va_list
ap
;
16
char
c
;
17
int
i
;
18
19
va_start
(
ap
,
size
);
20
d
=
va_arg
(
ap
,
typeof
(
d
));
21
c
=
d
.
e
.
x
[
3
];
22
if
(
c
!=
'3'
)
23
abort
();
24
if
(
d
.
r
!=
2602
)
25
abort
();
26
va_end
(
ap
);
27
}
28
29
int
main
(
void
)
30
{
31
int
z
=
5
,
i
;
32
struct
{
struct
{
char
a
[
z
]; }
y
;
unsigned
r
; }
x
;
33
34
x
.
y
.
a
[
0
] =
'0'
;
35
x
.
y
.
a
[
1
] =
'1'
;
36
x
.
y
.
a
[
2
] =
'2'
;
37
x
.
y
.
a
[
3
] =
'3'
;
38
x
.
y
.
a
[
4
] =
'4'
;
39
x
.
r
=
2602
;
40
foo
(
z
,
x
);
41
return
0
;
42
}