Examining the parent fields of an extended derived type in VS: New /switch:fe_debug_use_inherit Internal Command Line Switch

Examining the parent fields of an extended derived type in VS: New /switch:fe_debug_use_inherit Internal Command Line Switch

While reviewing the Release Notes for the recent compiler update (Intel Fortran Compiler 14, SP1, Update 2) to see what I'm missing out on, I found the following very interesting:

Quote:

3.3.1.4 New /switch:fe_debug_use_inherit Internal Command Line Switch (14.0.2)

 

Examining the parent fields of an extended derived type in the Microsoft Visual Studio* debugger currently requires that you also list the parent name. Add the internal command line switch /switch:fe_debug_use_inherit to your debug command line, and you will be able to use the abbreviated syntax to examine the parent field.

 

For example:

 
    TYPE BASE
       integer Base_Counter
    END TYPE BASE
 
    TYPE, EXTENDS (BASE) :: Type2
    END TYPE TYPE2
 
    TYPE(Type2) :: Foo
 

It is legal Fortran to reference either Foo%Base_Counter or Foo%base%base_counter.  Without the fe_debug_use_inherit switch, you cannot use the former form within the Microsoft Visual Studio debugger.

 

Please note however, if you do set the fe_debug_use_inherit switch, you are unable to use the latter form within the debugger.

 

This internal command line switch will not be supported in compiler version 15.0 as this feature will then be enabled by default.

 

Can our friends at Intel explain how this will work inside of Visual Studio IDE?  I've never used a debug command line switch before (there is always something new to learn!).

This does sound like a cool feature - kudos for Intel for adding it!  I'm also pleased to learn Intel will enable this by default starting with version 15.0 [even though I can only hope management will allow me an upgrade to that version :-(]

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

No text - try again?

Steve - Intel Developer Support

Unfortunate forum problem - the text has mysteriously disappeared - I did confirm it was there a few minutes after I posted the topic!

Anyways, here is what I had posted (hopefully it will show up):

While reviewing the Release Notes for the recent compiler update (Intel Fortran Compiler 14, SP1, Update 2) to see what I'm missing out on, I found the following very interesting:

Quote:

3.3.1.4 New /switch:fe_debug_use_inherit Internal Command Line Switch (14.0.2)

 

Examining the parent fields of an extended derived type in the Microsoft Visual Studio* debugger currently requires that you also list the parent name. Add the internal command line switch /switch:fe_debug_use_inherit to your debug command line, and you will be able to use the abbreviated syntax to examine the parent field.

 

For example:

 
 
    TYPE BASE
       integer Base_Counter
    END TYPE BASE
 
    TYPE, EXTENDS (BASE) :: Type2
    END TYPE TYPE2
 
    TYPE(Type2) :: Foo

It is legal Fortran to reference either Foo%Base_Counter or Foo%base%base_counter.  Without the fe_debug_use_inherit switch, you cannot use the former form within the Microsoft Visual Studio debugger.

 

Please note however, if you do set the fe_debug_use_inherit switch, you are unable to use the latter form within the debugger.

 

This internal command line switch will not be supported in compiler version 15.0 as this feature will then be enabled by default.

 

Can our friends at Intel explain how this will work inside of Visual Studio IDE?  I've never used a debug command line switch before (there is always something new to learn!).

This does sound like a cool feature - kudos to Intel for adding it!  I'm also pleased to learn Intel will enable this by default starting with version 15.0 [even though I can only hope management will allow me an upgrade to that version :-(]

Looks as if it isn't just your post that has no text - I will report.

Steve - Intel Developer Support
Best Reply

You would add this switch under the project property Fortran > Command Line > Additional Optione. It will cause the compiler to change how it emits debug information for this situation.

Steve - Intel Developer Support

Thanks much, Steve.  Unfortunately I won't get to try it out anytime soon :-(

By the way, the statement in the Release Notes, "Add the internal command line switch /switch:fe_debug_use_inherit to your debug command line", is somewhat misleading.  I took it to mean something needs to be done when a Debug session is started or specified under "Options and Settings" under Debug menu option in Visual Studio.

Since what you indicate effectively translates as a compiler switch (I assume if it will show up in the compiler build log file on each ifort command listing?), it will be nice if it shows up in the User Guide and Documentation (within Help Viewer) under compiler switches.  Do you think that is where we will see it?

Yes, you'll see it in the build log. As for documentation, this sort of switch is never documented - it's there as a temporary method to try out a compiler change without potentially risking other compiles. In the next release, the need for a switch will go away because it will be the default (and only) behavior.

Steve - Intel Developer Support

Steve,

Thanks.

"As for documentation, this sort of switch is never documented - it's there as a temporary method to try out a compiler change without potentially risking other compiles" - that makes sense.

While on the topic of undocumented switches, one that I'm using is "/stand:f08".  Has it been taken away with the latest update?

Or more importantly, is the ability to check one's code against the Fortran 2008 standard now available explicitly?  In my setup, the IDE only shows the option to check against Fortran 2003 standard (/stand:f03).  Per your earlier advice, I use the command line option /stand:f08.

I see /stand:f08 listed as one of the choices in Visual Studio using Composer XE SP1. /stand:f08 is a "first-class" option. /switch exists for temporary or debugging options - these are never in the main documentation, though may be in release notes or individual support replies. They are subject to change and removal without notice, though usually what happens in cases such as this is that the switch is just silently ignored if the behavior becomes the default.
 

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today