Silverfrost Forums

Welcome to our forums

Puzzling Bug in FTN95 7.10

26 Apr 2015 1:20 (Edited: 15 Jun 2015 10:23) #16237

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.

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 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]

27 Apr 2015 5:04 #16242

Thanks for this bug report. I have logged it for investigation.

8 Jun 2016 6:43 #17583

This has now been fixed for the next release.

Please login to reply.