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-990404-1.c
blob
bc2310e22d7b4516021e90b82d00954cef24a8e0
1
/*
2
990404-1.c from the execute part of the gcc torture suite.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#pragma disable_warning 84
10
#pragma disable_warning 85
11
#endif
12
13
14
int
x
[
10
] = {
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
15
16
void
17
testTortureExecute
(
void
)
18
{
19
int
niterations
=
0
,
i
;
20
21
for
(;;) {
22
int
i
,
mi
,
max
;
23
max
=
0
;
24
for
(
i
=
0
;
i
<
10
;
i
++) {
25
if
(
x
[
i
] >
max
) {
26
max
=
x
[
i
];
27
mi
=
i
;
28
}
29
}
30
if
(
max
==
0
)
31
break
;
32
x
[
mi
] =
0
;
33
niterations
++;
34
if
(
niterations
>
10
)
35
ASSERT
(
0
);
36
}
37
38
return
;
39
}