call test (1, 11, 3, (/ (i, i = 1, 11, 3) /))
call test (3, 20, 2, (/ (i, i = 3, 20, 2) /))
- call test (4, 0, 11, (/ (i, i = 4, 0, 11) /))
+ call test (4, 0, 11, (/ (i, i = 4, 0, 11) /)) ! { dg-warning "will be executed zero times" }
call test (110, 10, -3, (/ (i, i = 110, 10, -3) /))
call test (200, 20, -12, (/ (i, i = 200, 20, -12) /))
- call test (29, 30, -6, (/ (i, i = 29, 30, -6) /))
+ call test (29, 30, -6, (/ (i, i = 29, 30, -6) /)) ! { dg-warning "will be executed zero times" }
call test (1, order, 3, (/ (i, i = 1, order, 3) /))
call test (order, 1, -3, (/ (i, i = order, 1, -3) /))
! Triggers compile-time iterator calculations in trans-array.c
call test (1, 1000, 2, (/ (i, i = 1, 1000, 2), (i, i = order, 0, 1) /))
- call test (1, 0, 3, (/ (i, i = 1, 0, 3), (i, i = order, 0, 1) /))
- call test (1, 2000, -5, (/ (i, i = 1, 2000, -5), (i, i = order, 0, 1) /))
- call test (3000, 99, 4, (/ (i, i = 3000, 99, 4), (i, i = order, 0, 1) /))
+ call test (1, 0, 3, (/ (i, i = 1, 0, 3), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" }
+ call test (1, 2000, -5, (/ (i, i = 1, 2000, -5), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" }
+ call test (3000, 99, 4, (/ (i, i = 3000, 99, 4), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" }
call test (400, 77, -39, (/ (i, i = 400, 77, -39), (i, i = order, 0, 1) /))
do j = -10, 10
TEST_LOOP(i, 0, 1, 2, 1, test_i, 2)
TEST_LOOP(i, 0, 1, 3, 1, test_i, 3)
TEST_LOOP(i, 0, 1, huge(0), 1, test_i, huge(0))
- TEST_LOOP(i, 0, 1, -1, 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -2, 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -3, 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -huge(0), 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -huge(0)-1, 0, test_i, 0)
-
- TEST_LOOP(i, 1, 0, 1, 0, test_i, 1)
- TEST_LOOP(i, 1, 0, 2, 0, test_i, 1)
- TEST_LOOP(i, 1, 0, 3, 0, test_i, 1)
- TEST_LOOP(i, 1, 0, huge(0), 0, test_i, 1)
+ TEST_LOOP(i, 0, 1, -1, 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -2, 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -3, 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -huge(0), 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -huge(0)-1, 0, test_i, 0) ! { dg-warning "executed zero times" }
+
+ TEST_LOOP(i, 1, 0, 1, 0, test_i, 1) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 1, 0, 2, 0, test_i, 1) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 1, 0, 3, 0, test_i, 1) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 1, 0, huge(0), 0, test_i, 1) ! { dg-warning "executed zero times" }
TEST_LOOP(i, 1, 0, -1, 2, test_i, -1)
TEST_LOOP(i, 1, 0, -2, 1, test_i, -1)
TEST_LOOP(i, 1, 0, -3, 1, test_i, -2)
TEST_LOOP(i1, huge(i1), -huge(i1)-1_1, -huge(i1)-1_1, 2, test_i1, -huge(i1)-2_1)
TEST_LOOP(i1, -2_1, 3_1, huge(i1), 1, test_i1, huge(i1)-2_1)
- TEST_LOOP(i1, -2_1, 3_1, -huge(i1), 0, test_i1, -2_1)
+ TEST_LOOP(i1, -2_1, 3_1, -huge(i1), 0, test_i1, -2_1) ! { dg-warning "executed zero times" }
TEST_LOOP(i1, 2_1, -3_1, -huge(i1), 1, test_i1, 2_1-huge(i1))
- TEST_LOOP(i1, 2_1, -3_1, huge(i1), 0, test_i1, 2_1)
+ TEST_LOOP(i1, 2_1, -3_1, huge(i1), 0, test_i1, 2_1) ! { dg-warning "executed zero times" }
! Real loops
TEST_LOOP(r, 0.0, 1.0, 0.11, 1 + int(1.0/0.11), test_r, 0.0)
- TEST_LOOP(r, 0.0, 1.0, -0.11, 0, test_r, 0.0)
- TEST_LOOP(r, 0.0, -1.0, 0.11, 0, test_r, 0.0)
+ TEST_LOOP(r, 0.0, 1.0, -0.11, 0, test_r, 0.0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(r, 0.0, -1.0, 0.11, 0, test_r, 0.0) ! { dg-warning "executed zero times" }
TEST_LOOP(r, 0.0, -1.0, -0.11, 1 + int(1.0/0.11), test_r, 0.0)
TEST_LOOP(r, 0.0, 0.0, 0.11, 1, test_r, 0.0)
TEST_LOOP(r, 0.0, 0.0, -0.11, 1, test_r, 0.0)