Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26732 Discussions

impossible to display variable using displacement

LRaim
New Contributor I
98 Views

The following is not a new problem but I am a bit annoyed to find it when debugging.

If the following structure is defined:
​REAL(KIND=8)  VET1,VET2
​COMMON/DATA/VET1(100),VET2(50)
​one can address VET2(1) as VET1(1+JD) with JD set at 100.
​Now it is impossible to view the content of such a variable using Quick Watch in Visual Studio.
This windows displays the message 'subscript out of range' but the bound checking option has never been activated. 
​Tools in use:
Microsoft Visual Studio Professional 2015 Version 14.0.25420.01 Update 3
and
Intel® Parallel Studio XE 2016 Update 4 Composer Edition for C++ Windows* Integration for Microsoft* Visual Studio* 2015, Version 16.0.125.14
​Has this problem been corrected in subsequent releases ?

 

0 Kudos
4 Replies
andrew_4619
Honored Contributor I
98 Views

That isn't a bug is it. You are addressing beyond the bounds of the variable, and the debugger quite rightly says no. Yes I understand that you expect it to find vet2 at that address but why would the debugger developers want to devote effort to allowing you to do such a cludgy thing when there are valid ways of examining the contents of vet2?

LRaim
New Contributor I
98 Views

I am sorry to have no comments from Intel people about this matter. The behavior of the Intel fortran debugger shows worthless constraints revealing  a lack of specifications. This is worst than a bug.
​Whatever the language, a debugger should display the content of memory provided the address of a variable (scalar or array) is part of the address space of the application. Intel developers should at least learn from Microsoft developers.
Attached is the image of Visual Studio displaying an 'out of range' array element in C++.
​I can add that looking for an application bug it can be useful to view the content of the memory preceding the first element of an array or following the last element.
Best regards

 

 

   

 

 

andrew_4619
Honored Contributor I
98 Views

If you want to look at specific memory locations or ranges you can, for example using the memory windows.

 

Devorah_H_Intel
Moderator
98 Views

Luigi R. wrote:

I am sorry to have no comments from Intel people about this matter. The behavior of the Intel fortran debugger shows worthless constraints revealing  a lack of specifications. This is worst than a bug.
Whatever the language, a debugger should display the content of memory provided the address of a variable (scalar or array) is part of the address space of the application. Intel developers should at least learn from Microsoft developers.
Attached is the image of Visual Studio displaying an 'out of range' array element in C++.
I can add that looking for an application bug it can be useful to view the content of the memory preceding the first element of an array or following the last element.
Best regards

Thank you for the report. I have escalated this. If you need further assistance please use Online Service Center.

Reply