- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I did post this some time ago on the Intel Visual Fortran forum, but I go no answer so far. I hope I will have more success on this forum.
Since months debugging has been a hell because of a bug in the Intel Compiler and/or debugger integration: basically most (but not all) arrays are displayed with the length 0 in the debugger, and their content cannot be shown. The bug happens with allocatable arrays, pointers or static arrays. Of course it makes debugging pretty impossible, and I have to use WRITE statements... For instance the debugger shows me this:
whereas the array ARR has the size 2!
I finally succeeded to reproduce the bug with a simple program:
PROGRAM Console USE m1 IMPLICIT NONE TYPE(TypeBase) :: ObjectBase TYPE(TypeExt) :: ObjectExt WRITE(*,*) 'Set a breakpoint here => debugger shows ObjectBase%Arr with length 0!!!' END PROGRAM
and the module M1 is:
MODULE M1 IMPLICIT NONE PRIVATE TYPE, PUBLIC :: TypeBase REAL :: Arr(2) = 0.0 CONTAINS PROCEDURE :: AFunction END TYPE TYPE, PUBLIC, EXTENDS(TypeBase) :: TypeExt END TYPE CONTAINS FUNCTION AFunction(this) RESULT(Res) CLASS(TypeBase), INTENT(IN) :: this TYPE(TypeBase) :: Res END FUNCTION END MODULE
As you can see it needs a tricky combination:
- If you comment the declaration of the variable ObjectExt in the program, it works as expected (debugger displays correct length and content)
- If the function AFunction is not type bound anymore, it works as expected
- If AFunction is made a subroutine, it works as expected
- If one removes the type extension, it works as expected
So it seems that using a combination of type-bound functions and type extension prevents the debugger (or the Fortran expression evaluator FEE) to show the length and content of arrays contained in derived types. I tried to play with debugger options in Visual Studio, and also with compiler settings, without success.
I am using Visual Studio 2015. I had the problem with the VS 2015 Update 2, and now Update 3, and with both Intel Visual Fortran 2016 and 2017.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
at first glance it looked like you're right here since you use the debugger. So I checked with our FEE engineers and they confirmed the issue. However, it's compiler related since the debug information seems to be faulty in that exact case.
As a result I've filed an internal ticket (DPD200588188) to improve the debug information generation of the Intel Fortran Compiler. As soon as this is fixed, I'll let you know.
Best regards,
Georg Zitzlsberger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Georg,
That's great news. I hope it will be fixed soon, at the moment debugging is almost impossible...
Best regards
Hervé

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