- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The IFX compiler is not showing common blocks in the debugger watch window. The code below shows DATA.Var1 as expected in the Visual Studio watch window.
PROGRAM WatchTest
STRUCTURE /S_DATA /
REAL Var1
END STRUCTURE
!COMMON /C_DATA/ DATA
RECORD /S_DATA/ DATA
DATA.Var1 = 5.0
END PROGRAM
However, if I remove the "!" to activate the COMMON block the DATA.Var1 does not show in the Visual Studio watch window. Instead, it gives me "Invalid structure member 'Var1'".
I am using:
Intel Fortran Compiler 2024.1
Visual Studio 17.11.4
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may have a fundamental misunderstanding of named common. Common defines a storage area with global scope. It is NOT a derived type or structure. for COMMON / C_DATA /, the variable VAR1 is NOT a component, since DATA is not a structure.
I am surprised this even compiled for you. I am using a prebuild of 2025.0 and ifx rejects your syntax
Data.Var1 = 5.0
with a compiler error #6535 "This variable or component must be of derived or structure type".
For Data in C_COMMON the syntax should be
Var1 = 5.0
Correct understand of the common declaration you have is this:
There is a global storage area named "C_DATA".
In this storage area is a kind REAL variable named "Var1" that you can reference as "Var1".
It is not a structure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ron,
Thanks for your time. I see my example was poorly chosen. Please consider the updated example below. It tries to follow the partial sample in the intel help: COMMON (intel.com),
The help does show that common blocks can include structured types. This does run and work, the only issue is that the debugger in IFX isn't able to resolve club(1).a in the watch window.
If the example below is still not an acceptable use of COMMON, an example of the correct use of structures in COMMON blocks is greatly appreciated.
PROGRAM MAIN
STRUCTURE /member/
REAL a
END STRUCTURE
RECORD /member/ club(50)
COMMON /blocka/ club
club(1).a = 5.0
WRITE(*,*) club(1).a
END PROGRAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
program main
type :: member
sequence
real a
end type
type(member) :: club(50)
common /blocka/ club
club(1)%a = 5.0
write(*,*) club(1)%a
end program
Out of curiosity I rewrote the sample in conforming Fortran removing the ancient and non-standard STRUCTURE/RECORD syntax to see if that was part of the problem. I can conform that club(1)%a cannot be watched in the debugger. As noted by the OP commenting out line 9 , the common definition enables club(1)%a to be watched. I would suggest this is a bug in the integrations it works in IFORT btw.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Devorah,
Are there any status updates you can share, or any issue/bug tracking link I can follow? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Bryan_H_1 wrote:
Hi Devorah,
Are there any status updates you can share, or any issue/bug tracking link I can follow? Thanks.
The compiler engineering team is fixing the case. The fix is targeted for the 2025.1 version of the compiler since it is too late for the 2025.0 release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should have noted also that the IFORT/IFX tests were both 64 bit.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page