Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29361 Discussions

Module variable visible even though not USE'd

ferrad01
Beginner
701 Views
I have 100's of modules, all in one file, ALLMODU.FOR

I USE only the modules I need, however I can "see" in the debugger variables in other modules. Why / how is this possible? eg. I have a allocatable array called SNAME in a new module called PVT_MODULE which I check is unallocated before I allocate it. However when I step into this code, SNAME is already allocated. It turns out there is another variable called SNAME in another module I am not USEing. I'm confused why this one is being refered to, not the one in my new module.
0 Kudos
2 Replies
Steven_L_Intel1
Employee
701 Views
Well, all the debug information is combined in the object file. but the debugger ought to keep these distinct. Can you show us a small test case that demonstrates the pronblem?
0 Kudos
ferrad01
Beginner
701 Views
I tried but it works fine in my small test case. In the meantime I renamed the variable in my module, although it's disconcerting that variables in unUSEd modules make it into the subroutine.
0 Kudos
Reply