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 middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
920908-1.c
blob
98fbb5eaa6df5cec0b1025b4f1440876fffb7639
1
/* REPRODUCED:RUN:SIGNAL MACHINE:mips OPTIONS: */
2
3
#include <stdarg.h>
4
5
typedef
struct
{
int
A
;}
T
;
6
7
T
f
(
int
x
,...)
8
{
9
va_list
ap
;
10
T X
;
11
va_start
(
ap
,
x
);
12
X
=
va_arg
(
ap
,
T
);
13
if
(
X
.
A
!=
10
)
abort
();
14
X
=
va_arg
(
ap
,
T
);
15
if
(
X
.
A
!=
20
)
abort
();
16
va_end
(
ap
);
17
return
X
;
18
}
19
20
main
()
21
{
22
T X
,
Y
;
23
int
i
;
24
X
.
A
=
10
;
25
Y
.
A
=
20
;
26
f
(
2
,
X
,
Y
);
27
exit
(
0
);
28
}