OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Backported from mainline
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
990404-1.c
1
2
int x[10] = { 0,1,2,3,4,5,6,7,8,9};
3
4
int
5
main()
6
{
7
int niterations = 0, i;
8
9
for (;;) {
10
int i, mi, max;
11
max = 0;
12
for (i = 0; i < 10 ; i++) {
13
if (x[i] > max) {
14
max = x[i];
15
mi = i;
16
}
17
}
18
if (max == 0)
19
break;
20
x[mi] = 0;
21
niterations++;
22
if (niterations > 10)
23
abort ();
24
}
25
26
exit (0);
27
}