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
Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tcc
/
79_vla_continue.c
blob
dd6379014a2abce48831793837cb16c564baedc8
1
#include <stdio.h>
2
3
int
f
(
void
)
4
{
5
return
5
;
6
}
7
8
void
test1
()
9
{
10
int
count
=
10
;
11
void
*
addr
[
10
];
12
for
(;
count
--;) {
13
int
a
[
f
()];
14
15
addr
[
count
] =
a
;
16
17
continue
;
18
}
19
20
if
(
addr
[
9
] ==
addr
[
0
]) {
21
printf
(
"OK
\n
"
);
22
}
else
{
23
printf
(
"NOT OK
\n
"
);
24
}
25
}
26
27
void
test2
()
28
{
29
int
count
=
10
;
30
void
*
addr
[
count
];
31
for
(;
count
--;) {
32
int
a
[
f
()];
33
34
addr
[
count
] =
a
;
35
36
continue
;
37
}
38
39
if
(
addr
[
9
] ==
addr
[
0
]) {
40
printf
(
"OK
\n
"
);
41
}
else
{
42
printf
(
"NOT OK
\n
"
);
43
}
44
}
45
46
void
test3
()
47
{
48
int
count
=
10
;
49
void
*
addr
[
count
];
50
while
(
count
--) {
51
int
b
[
f
()];
52
if
(
count
>=
0
) {
53
int
a
[
f
()];
54
55
addr
[
count
] =
a
;
56
57
continue
;
58
}
59
}
60
61
if
(
addr
[
9
] ==
addr
[
0
]) {
62
printf
(
"OK
\n
"
);
63
}
else
{
64
printf
(
"NOT OK
\n
"
);
65
}
66
}
67
68
void
test4
()
69
{
70
int
count
=
10
;
71
void
*
addr
[
count
];
72
do
{
73
int
a
[
f
()];
74
75
addr
[--
count
] =
a
;
76
77
continue
;
78
}
while
(
count
);
79
80
if
(
addr
[
9
] ==
addr
[
0
]) {
81
printf
(
"OK
\n
"
);
82
}
else
{
83
printf
(
"NOT OK
\n
"
);
84
}
85
}
86
87
void
test5
()
88
{
89
int
count
=
10
;
90
int
a
[
f
()];
91
int
c
[
f
()];
92
93
c
[
0
] =
42
;
94
95
for
(;
count
--;) {
96
int
b
[
f
()];
97
int
i
;
98
for
(
i
=
0
;
i
<
f
();
i
++) {
99
b
[
i
] =
count
;
100
}
101
}
102
103
if
(
c
[
0
] ==
42
) {
104
printf
(
"OK
\n
"
);
105
}
else
{
106
printf
(
"NOT OK
\n
"
);
107
}
108
}
109
110
int
main
(
void
)
111
{
112
test1
();
113
test2
();
114
test3
();
115
test4
();
116
test5
();
117
118
return
0
;
119
}