blob: a47751837db90e1018f698cb97a1d9ffdf66c59f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#define N 20
#include "limits.h"
#include <stdio.h>
int A[N];
void single_do_loop_int_max_iterations() {
int i;
__sync_synchronize();
i = 0;
do {
A[0] = i;
++i;
} while (i < INT_MAX);
__sync_synchronize();
}
int main () {
int i;
A[0] = 0;
single_do_loop_int_max_iterations();
fprintf(stdout, "Output %d\n", A[0]);
if (A[0] == INT_MAX - 1)
return 0;
else
return 1;
}
|