Silverfrost Forums

Welcome to our forums

Compiler fails to detect syntax error in STOP statement

3 May 2021 2:27 (Edited: 3 May 2021 7:46) #27677

The following test program contains a STOP statement with a composite I/O list instead of a string expression. The compiler does not catch this, and the result is access violations in the run time library at run time.

program stopbug
implicit none
integer iter
real x,f
!
iter = 0
x = 1.0
do
   iter = iter+1
   x = (x+2/x)/2
   if(abs(x*x-2.0) < 1e-7)exit
   if(iter > 5)stop 'Did not finish in ',iter,' iterations'  ! ** SYNTAX ERROR, not caught
end do
end program
3 May 2021 5:44 #27678

mecej4

Thank you for the bug report which I have logged for action.

3 May 2021 9:46 #27680

mecej4

This failure has now been fixed for the next release of FTN95 which I plan to make available later today.

Please login to reply.