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
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-20010209-1.c
blob
cda61cb49a1116686dd2200e8721c22042929c18
1
/*
2
20010209-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
// TODO: Enable when sdcc supports VLA!
12
13
#if 0
14
int
b
;
15
int
foo
(
void
)
16
{
17
int
x
[
b
];
18
int
bar
(
int
t
[
b
])
19
{
20
int
i
;
21
for
(
i
=
0
;
i
<
b
;
i
++)
22
t
[
i
] =
i
+ (
i
>
0
?
t
[
i
-
1
] :
0
);
23
return
t
[
b
-
1
];
24
}
25
return
bar
(
x
);
26
}
27
#endif
28
29
void
30
testTortureExecute
(
void
)
31
{
32
#if 0
33
b
=
6
;
34
if
(
foo
() !=
15
)
35
ASSERT
(
0
);
36
return
;
37
#endif
38
}
39