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 

Puzzling Bug in FTN95 7.10

 
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: 1886

PostPosted: Sun Apr 26, 2015 2:20 pm    Post subject: Puzzling Bug in FTN95 7.10 Reply with quote

There is a puzzling code generation bug that is exposed by the following example code, which may look silly because lots of lines were removed to reduce its size while preserving the bug.
Code:
program mistfile
implicit none
real :: e6a=1,e6b=2,e6c
namelist /nex/e6a,e6b,e6c
!
e6c=e6a+e6b
write(*,nml=nex)
stop
!
contains
!
real function ssbw()
implicit none
real :: s1
namelist /nsbw/s1
ssbw=0
return
end function ssbw
!
end program

The contained function is never invoked, and within the function the namelist nbw is not referenced. The bug disappears if the function code is removed or if just the namelist declaration is removed!

When the code is compiled and run, an access violation occurs at main+0030H. The instruction at this location is
Code:
mov [ebx-0x10],edi
and the bug is that ebx (which I suspect is used by mistake instead of ebp) was never assigned a value in the program -- it retains whatever value was set into that register in the earlier call to ___FTN95INIT1_ in SALFLIBC.DLL.

[P.S., 15 June 2015: This bug is also present in FTN95-7.20]


Last edited by mecej4 on Mon Jun 15, 2015 11:23 pm; edited 3 times in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Apr 27, 2015 6:04 am    Post subject: Reply with quote

Thanks for this bug report. I have logged it for investigation.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Wed Jun 08, 2016 7:43 am    Post subject: Reply with quote

This has now been fixed for the next release.
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