- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Derived types in COMMON blocks are not visible to the IFX debugger. I am running Windows 10 Professional Version 22H2 and Visual Studio 2022 Professional LTSC 17.8 with Intel Fortran IFX 2024.2.0. Here is a short program that demonstrates the problem. If the COMMON statement is removed and tbuf is properly dimensioned elsewhere, then the debugger can see tbuf. Otherwise it reports "Undefined variable tbuf".
=================================================================
program inp1m
c
c*************************** inp1m (inp1m) ***************************
c
c input processor no. 1 module.
c
implicit double precision (a-h, o-z), integer(8) (i-n)
c
c type used for bucket variables
c
type bckt
sequence
double precision db ! also used to store character data
integer(8) in
end type
common /generl/ ltb, tbuf(10)
type (bckt) tbuf
c
c initialize tbuf
c
do i = 1, 10
tbuf(i)%db = 0.d0
tbuf(i)%in = i
enddo
c
c ltb is visible in the ifx debugger in VS 2022 but tbuf is not.
c If the common statement is eliminated both variables are visible.
c
ltb = sizeof(tbuf)/sizeof(tbuf(1))
stop
end
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes you are correct, IFORT does show tbuf in the debugger and IFX does not. One of quite a few debugger issues with IFX. Are you new to Fortran? Is this new code? There is much that makes me feel quite ill looking at your code example. The implicit statement, fixed format, use of common......
FYI, ltb = size(tbuf) would be enough and is not an extension like sizeof is. Sorry for moaning, I could not help it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is a much cut down portion of a legacy code written more than 50 years ago in the punch card era. It was originally written in FORTRAN66, than minimally migrated to Fortran77, then to Fortran 90 without using modern features such as modules.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page