Software Archive
Read-only legacy content
17061 Discussions

Fortran PARAMETERs shown twice in debugger

mecej4
Honored Contributor III
451 Views

When a Fortran program containing PARAMETER declarations is compiled with the /Zi /debug-parameters:used options, the parameters are displayed twice in the Locals window. Here is example code:

! test viewing PARAMETER values in debugger
!
program tst
implicit none
integer, parameter :: N=10,M=20,L=M+N
integer :: iv(M-N),i
!
do i=1,size(iv)
   iv(i)=N+i
end do
write(*,*)iv
end program

I have attached a screenshot of the duplicated display of the parameters in the debugger.

0 Kudos
1 Solution
Georg_Z_Intel
Employee
451 Views

Hello,

thank you for telling us. I was able to get the same result and filed a ticket (DPD200564644) against the debugger extension (even though I think it might be a debug information issue with the compiler).

I'll let you know about the progress.

Best regards,

Georg Zitzlsberger

View solution in original post

0 Kudos
4 Replies
mecej4
Honored Contributor III
451 Views

Here are some details to help reproduce the problem. The compiler used was the 32-bit IFort compiler, version 15.0.2.179, on Windows 8.1 X64, on an Ultrabook with an i5-4200U CPU, Visual Studio 2013.

0 Kudos
Georg_Z_Intel
Employee
452 Views

Hello,

thank you for telling us. I was able to get the same result and filed a ticket (DPD200564644) against the debugger extension (even though I think it might be a debug information issue with the compiler).

I'll let you know about the progress.

Best regards,

Georg Zitzlsberger

0 Kudos
mecej4
Honored Contributor III
451 Views

Georg: Thanks, and you are correct about the error being in the debug information. Let me know whether I should report the problem in the compiler forum. Or, you could move this thread to the Visual Fortran forum.

Using the hint that you gave, I built and ran the utility dia2dump (provided as an example in the DIA SDK subdirectory under Visual Studio) on the .PDB file, and this section of the dump confirms what you suspected (please scroll to the right edge of lines 13-16) :

CompilandEnv   : cwd = "S:\lang"
CompilandEnv   : cmd = "-MD -traceback -Zi -debug-parameters:used"
CompilandEnv   : src = "tpar.f90"
CompilandEnv   : pdb = "vc120.pdb"

Function       : static, [00001000][0001:00000000], len = 000000A6, TST
                 Function attribute:
                 Function info:
FuncDebugStart :   static, [0000101E][0001:0000001E]
FuncDebugEnd   :   static, [000010A4][0001:000000A4]
Data           :   VFrame Relative, [FFFFFFD4], Local, Type: long, I
Data           :   static, [00006100][0004:00000100], Static Local, Type: long[0xA], IV
Data           :   static, [00004164][0003:00000164], Static Local, Type: long, M
Data           :   static, [00004164][0003:00000164], Static Local, Type: long, M
Data           :   static, [00004168][0003:00000168], Static Local, Type: long, N
Data           :   static, [00004168][0003:00000168], Static Local, Type: long, N

 

0 Kudos
Georg_Z_Intel
Employee
451 Views

Hello,

it has been identified as a debug information issue. This will be fixed with the future 16.0 Fortran compiler. You should be able to see the fix already with the next 16.0 BETA Update 1 release around beginning of May.

Best regards,

Georg Zitzlsberger

0 Kudos
Reply