gcc/testsuite/gcc.c-torture/execute/pr42142.c
raw| 1 | int __attribute__((noinline,noclone)) |
| 2 | sort(int L) |
| 3 | { |
| 4 | int end[2] = { 10, 10, }, i=0, R; |
| 5 | while (i<2) |
| 6 | { |
| 7 | R = end[i]; |
| 8 | if (L<R) |
| 9 | { |
| 10 | end[i+1] = 1; |
| 11 | end[i] = 10; |
| 12 | ++i; |
| 13 | } |
| 14 | else |
| 15 | break; |
| 16 | } |
| 17 | return i; |
| 18 | } |
| 19 | extern void abort (void); |
| 20 | int main() |
| 21 | { |
| 22 | if (sort (5) != 1) |
| 23 | abort (); |
| 24 | return 0; |
| 25 | } |
| 26 |