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
Do not cost the permute node that are part of SLP load-lanes
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
va-arg-13.c
blob
5b96e5c6a5a10b8eb355eef25436b6b6fffc4744
1
/* derived from mozilla source code */
2
3
#include <stdarg.h>
4
5
void
abort
(
void
);
6
void
exit
(
int
);
7
8
typedef
struct
{
9
void
*
stream
;
10
va_list
ap
;
11
int
nChar
;
12
}
ScanfState
;
13
14
void
dummy
(
va_list
vap
)
15
{
16
if
(
va_arg
(
vap
,
int
) !=
1234
)
abort
();
17
return
;
18
}
19
20
void
test
(
int
fmt
, ...)
21
{
22
ScanfState state
, *
statep
;
23
24
statep
= &
state
;
25
26
va_start
(
statep
->
ap
,
fmt
);
27
dummy
(
statep
->
ap
);
28
va_end
(
statep
->
ap
);
29
30
va_start
(
state
.
ap
,
fmt
);
31
dummy
(
state
.
ap
);
32
va_end
(
state
.
ap
);
33
34
return
;
35
}
36
37
int
main
(
void
)
38
{
39
test
(
456
,
1234
);
40
exit
(
0
);
41
}