forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiler fails to detect syntax error in STOP statement

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Mon May 03, 2021 3:27 am    Post subject: Compiler fails to detect syntax error in STOP statement Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon May 03, 2021 6:44 am    Post subject: Reply with quote

mecej4

Thank you for the bug report which I have logged for action.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon May 03, 2021 10:46 am    Post subject: Reply with quote

mecej4

This failure has now been fixed for the next release of FTN95 which I plan to make available later today.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group