2 20020402-1.c from the execute part of the gcc torture suite.
11 /* derived from PR c/2100 */
16 void testTortureExecute(void)
18 int listElem
[NUM_ELEM
]={30,2,10,5};
19 int listSmall
[SMALL_N
];
21 int posGreatest
=-1, greatest
=-1;
23 for (i
=0; i
<SMALL_N
; i
++) {
24 listSmall
[i
] = listElem
[i
];
25 if (listElem
[i
] > greatest
) {
27 greatest
= listElem
[i
];
31 for (i
=SMALL_N
; i
<NUM_ELEM
; i
++) {
32 if (listElem
[i
] < greatest
) {
33 listSmall
[posGreatest
] = listElem
[i
];
35 greatest
= listSmall
[0];
36 for (j
=1; j
<SMALL_N
; j
++)
37 if (listSmall
[j
] > greatest
) {
39 greatest
= listSmall
[j
];
44 if (listSmall
[0] != 5 || listSmall
[1] != 2)