aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/loop-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/loop-3.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/loop-3.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/loop-3.c b/SingleSource/Regression/C/gcc-c-torture/execute/loop-3.c
new file mode 100644
index 00000000..e314a01b
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/loop-3.c
@@ -0,0 +1,27 @@
+#include <limits.h>
+
+int n = 0;
+
+g (i)
+{
+ n++;
+}
+
+f (m)
+{
+ int i;
+ i = m;
+ do
+ {
+ g (i * INT_MAX / 2);
+ }
+ while (--i > 0);
+}
+
+main ()
+{
+ f (4);
+ if (n != 4)
+ abort ();
+ exit (0);
+}