diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/loop-7.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/loop-7.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-7.c b/gcc/testsuite/gcc.c-torture/execute/loop-7.c new file mode 100644 index 000000000..48a2599b2 --- /dev/null +++ b/gcc/testsuite/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); +} |