Please look at this extract from a program code:
INTEGER(KIND=4) :: NI REAL(KIND=8) :: C,SH,R,PSH REAL(KIND=8), DIMENSION(2) :: EP REAL(KIND=8), PARAMETER :: MP=EPSILON(1.D0) ... EP(1)=SH+C*DSIN(SH) WRITE(*,*) 'EP(1)-1',EP(1) NI=2 WRITE(*,*) 'EP(NI)-1',EP(2) DO WHILE (.TRUE.) EP(NI)=SH+C*DSIN(EP(NI-1)) ! error #12192: [SV] unreachable statement WRITE(*,*) 'EP(NI)-2',EP(NI) ! error #12192: [SV] unreachable statement R=DABS(EP(NI)-EP(NI-1)) ! error #12192: [SV] unreachable statement IF(R-0.D0<=MP) EXIT EP(NI-1)=EP(NI) ! error #12192: [SV] unreachable statement END DO PSH=EP(NI) ! error #12192: [SV] unreachable statement ...
I see the errors, but in fact I have the following output:
EP(1)-1 2.83115703117778 <- EP(1) EP(NI)-1 0.000000000000000E+000 <- EP(2) EP(NI)-2 2.83115685915829 <- EP(NI) EP(NI)-2 2.83115685928421 <- EP(NI) EP(NI)-2 2.83115685928411 <- EP(NI) EP(NI)-2 2.83115685928411 <- EP(NI)
Why do I get the errors that lines with comments are the unreachable statements? What’s wrong?