summaryrefslogtreecommitdiffstats
path: root/polly/test/CodeGen/single_loop_int_max_iterations.c
diff options
context:
space:
mode:
Diffstat (limited to 'polly/test/CodeGen/single_loop_int_max_iterations.c')
-rw-r--r--polly/test/CodeGen/single_loop_int_max_iterations.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/polly/test/CodeGen/single_loop_int_max_iterations.c b/polly/test/CodeGen/single_loop_int_max_iterations.c
new file mode 100644
index 00000000000..d102fbf5dd2
--- /dev/null
+++ b/polly/test/CodeGen/single_loop_int_max_iterations.c
@@ -0,0 +1,21 @@
+#define N 20
+#include "limits.h"
+
+int main () {
+ int i;
+ int A[N];
+
+ A[0] = 0;
+
+ __sync_synchronize();
+
+ for (i = 0; i < INT_MAX; i++)
+ A[0] = i;
+
+ __sync_synchronize();
+
+ if (A[0] == INT_MAX - 1)
+ return 0;
+ else
+ return 1;
+}
OpenPOWER on IntegriCloud