repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-20000519-1.c
blob
581c8c959743c18531f0c4bf0c5ae12b2d5525b1
1
/*
2
20000519-1.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
#include <stdarg.h>
12
13
int
14
bar
(
int
a
,
va_list
ap
)
15
{
16
int
b
;
17
18
do
19
b
=
va_arg
(
ap
,
int
);
20
while
(
b
>
10
);
21
22
return
a
+
b
;
23
}
24
25
int
26
foo
(
int
a
, ...)
27
{
28
va_list
ap
;
29
30
va_start
(
ap
,
a
);
31
return
bar
(
a
,
ap
);
32
}
33
34
void
35
testTortureExecute
(
void
)
36
{
37
if
(
foo
(
1
,
2
,
3
) !=
3
)
38
ASSERT
(
0
);
39
return
;
40
}
41