debugging and Fortran modules

debugging and Fortran modules

I am having a problem in VS 2012 / Intel Fortran when using  Fortran MODULES If I declare some variables in a MODULE, then USE the MODULE  with a program unit, then when debugging I expect to be able to Watch the contents of all the variables within that module – this is the case with COMMON blocks and worked fine for MODULEs under VS 2008

What I am observing is that I can only see the contents of variables that are actually referred to within the program unit (Subroutine / Function) – all other variables appear Undefined. For example if the module has x and y variables,  and the particular subrouitine only has x apperaing in it , the value of y is undefined when debugging

I would be grateful for any help

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

Yes, this is by design. You can add a watch for modulename::variablename to watch variables not referenced in the program unit.

Retired 12/31/2016

Thanks Steve - however it appears in 2008 "variablename"  works BUT "modulename::variablename" doesnt, while  it is opposite in 2012. The disadvantage in 2012 is that if you have a long module name then you have to increase the column width size in the watch list to see what the variable is


Interesting - I'll check this out.

Retired 12/31/2016

Leave a Comment

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