|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Sun Apr 26, 2015 2:20 pm Post subject: Puzzling Bug in FTN95 7.10 |
|
|
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 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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Apr 27, 2015 6:04 am Post subject: |
|
|
Thanks for this bug report. I have logged it for investigation. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Jun 08, 2016 7:43 am Post subject: |
|
|
This has now been fixed for the next release. |
|
Back to top |
|
|
|
|
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
|