PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / real_do_1.f90
blob95fb47378a5288c66aa5518a6b16bb0408696265
1 ! { dg-do run }
2 ! { dg-warning "Loop variable" "Loop" { target *-*-* } 13 }
3 ! { dg-warning "Start expression" "Start" { target *-*-* } 13 }
4 ! { dg-warning "End expression" "End" { target *-*-* } 13 }
5 ! { dg-warning "Step expression" "Step" { target *-*-* } 13 }
6 ! Test REAL type iterators in DO loops
7 program real_do_1
8 real x, y
9 integer n
11 n = 0
12 y = 1.0
13 do x = 1.0, 2.05, 0.1
14 call check (x, y)
15 y = y + 0.1
16 n = n + 1
17 end do
18 if (n .ne. 11) call abort()
19 contains
20 subroutine check (a, b)
21 real, intent(in) :: a, b
23 if (abs (a - b) .gt. 0.00001) call abort()
24 end subroutine
25 end program