Silverfrost Forums

Welcome to our forums

Bug report in sdbg64 (version 8.70)

25 Feb 2021 5:00 #27173

Hello, There is a bug in sdbg64 (version 8.70), that I want to report. I compiled the below code as a 64-bit program:

program Test_sdbg64
Implicit None

Character (LEN=24), External :: func
Character (LEN=40)           :: res
Character (LEN= 1)           :: lan

lan = 'E'
res = ' ' // func (lan)
write(*,*) res
end program


Function func (spr)
Implicit None

Character (LEN=24) :: func
Character (LEN= 1) :: spr

if (INDEX('Ee',spr) == 0) then    ! 64-bit Debugger doesn't work
! if (.FALSE.) then               ! 64-bit Debugger works
   func = 'Case A                  '
else
   func = 'Case B                  '
end if
end

When I open the 64-bit executable with the debugger and step into the func function, the curser goes directly to the end statement and it is not possible to put a breakpoint before that to follow the process. However, when I switch between the if statements, i.e.:

! if (INDEX('Ee',spr) == 0) then    ! 64-bit Debugger doesn't work
if (.FALSE.) then               ! 64-bit Debugger works

the debugger behaves normal. This is not the case with 32-bit version and the debugger starts from the start point of the fuction, as I step into it.

25 Feb 2021 5:13 #27174

Perhaps you are using different DLLs than the ones that I have?

I compiled with /64 /debug and was able to step through as well as place a breakpoint on line-20. Everything looked normal!

25 Feb 2021 10:18 #27177

Ensure you are using FTN95 8.70. Whether a line can be breakpointed is something the compiler determines (not sdbg64).

26 Feb 2021 7:36 #27178

I am using ftn95 version 8.70.393 and the silverfrost dlls are from 04.01.2021.

26 Feb 2021 1:35 #27182

Moji

Your sample works OK for me. If/when possible I will send you an updated FTN95.

26 Feb 2021 1:40 #27183

Thank you Paul. Sure, that would be great.

22 Apr 2021 2:29 #27601

Moji asked me for assistance and we detected the reason for different behaviour:

  1. If compiled with [color=red:cc3e2c4ce0] ftn95 /64 /debug [/color:cc3e2c4ce0] it works.

  2. If compiled with [color=red:cc3e2c4ce0] ftn95 /64 /debug /check [/color:cc3e2c4ce0] the problem occurs.

22 Apr 2021 3:09 #27602

OK thanks. I will take another look at it.

10 May 2021 8:43 #27723

This turned out to be a failure in FTN95. It has now been fixed for the next release of FTN95.

19 May 2021 10:37 #27804

Paul, I tested it again (with the new compiler and the new slink64). The Problem is still there and the debugger jumps directly to the last line of the function.

19 May 2021 11:10 #27806

Moji

Sorry about that. I will refer this back for further investigation.

I thought that I had tested this but maybe I did not add /check.

1 Jun 2021 7:12 #27886

Hopefully this will now be fixed in the next release of FTN95.

I have tested the latest fix using first /CHECK and then /DEBUG.

Please login to reply.