Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Undefined Address - Pointer

fwess
Beginner
673 Views
Hello,

I am confronted with a problem while debugging and I have attached an example for this problem to this post. I do not know whether this is a real problem with the Fortran compiler / debugger or I have made a mistake. An array referenced by a pointer is used in a subroutine. The watch window says it has an "undefined address". I am using Intel Visual Fortran Compiler 9.1.3192 and Visual Studio .NET 2003. Hopefully someone can tell me what is wrong. Thank you in advance.

fwess

0 Kudos
2 Replies
Steven_L_Intel1
Employee
673 Views

I can reproduce the problem with the current 9.1.034 compiler. Please submit an issue to Intel Premier Support and attach your sources. (Please use ZIP instead of RAR.)

A note - the version number you give is that of the Visual Studio integration and not the compiler version. You can get the compiler version by looking at C:Program FilesIntelCompilerFortran9.1DocsNotesfsupport.txt

0 Kudos
jimdempseyatthecove
Honored Contributor III
673 Views

I too have run into this before. As a work around make a conditional compile section on _DEBUG that creates a helperlocal pointer to the array and an conditional compile section to initialize the pointer to the location specifiedby the dummy argument. Then instead of watching the dummy argument, watch the alternate pointer.

The symptoms I generally saw was the array descriptior for the dummy argument was not interpreted correctly. But upon copying (=>) of descriptors the debugger would then be able to watch the array.

Note, you might want to test the dummy argument for validity too

!DEC$ IF DEFINED(_DEBUG)
real, pointer :: pArg(:)
!DEC$ ENDIF
...
!DEC$ IF DEFINED(_DEBUG)
if(.not. PRESENT(Arg))BugFound()
pArg => Arg
!DEC$ ENDIF

Jim Dempsey

0 Kudos
Reply