aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/loop-7.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/loop-7.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/loop-7.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/loop-7.c b/SingleSource/Regression/C/gcc-c-torture/execute/loop-7.c
new file mode 100644
index 00000000..48a2599b
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/loop-7.c
@@ -0,0 +1,19 @@
+void foo (unsigned int n)
+{
+ int i, j = -1;
+
+ for (i = 0; i < 10 && j < 0; i++)
+ {
+ if ((1UL << i) == n)
+ j = i;
+ }
+
+ if (j < 0)
+ abort ();
+}
+
+main()
+{
+ foo (64);
+ exit (0);
+}