Created attachment 341239 [details] Reproducer Compiling the attached program with gfortran43 and then starting it and stepping into it a short way, the xxx variable is unaccessible when it should not be. When compiling with icc, gdb doesn't display values correctly, but icc does. Another attempt by the l2 to reproduce the issue resulted in none of the variables being accessible
Just a note this is a problem with the GDB Fortran modules support: Bug 466118
There is a patch which should still get some cleanup but it already works fine: http://sourceware.org/gdb/wiki/ArcherBranchManagement archer-jankratochvil-fortran-module There is a new test case made according to this Bug / reproducer: gdb.fortran/library-module.exp Closing as a DUPLICATE of the RHEL-5.4 Bug 466118 to save some ACKs work. $ ../gdb -q -nx /tmp/tx_shared_module/tx_shared_module_use (gdb) start Temporary breakpoint 1 at 0x4007f0: file tx_shared_module_use.f90, line 2. Starting program: /tmp/tx_shared_module/tx_shared_module_use Temporary breakpoint 1, tx_shared_module_use () at tx_shared_module_use.f90:2 2 program tx_shared_module_use Current language: auto; currently fortran (gdb) n 4 xxx = 10 (gdb) p xxx $1 = 0 (gdb) n 5 call zeroit (gdb) p xxx $2 = 10 (gdb) s zeroit () at tx_shared_module.f90:14 14 call innerzero (gdb) p xxx $3 = 10 (gdb) n tx_shared_module_use () at tx_shared_module_use.f90:6 6 call init (gdb) p xxx $4 = 0 (gdb) l 1 ! Use a module in a shared library 2 program tx_shared_module_use 3 use tx_shared_module 4 xxx = 10 5 call zeroit 6 call init 7 xxx = 20 8 end program tx_shared_module_use (gdb) n 7 xxx = 20 (gdb) p xxx $5 = 1 *** This bug has been marked as a duplicate of bug 466118 ***