View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Mon May 03, 2021 3:27 am Post subject: Compiler fails to detect syntax error in STOP statement |
|
|
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.
Code: | 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 |
Last edited by mecej4 on Mon May 03, 2021 8:46 am; edited 1 time in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon May 03, 2021 6:44 am Post subject: |
|
|
mecej4
Thank you for the bug report which I have logged for action. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon May 03, 2021 10:46 am Post subject: |
|
|
mecej4
This failure has now been fixed for the next release of FTN95 which I plan to make available later today. |
|
Back to top |
|
|
|