Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 497567

Summary: "unable to access variable" message debugging gfortran43 program
Product: Red Hat Enterprise Linux 5 Reporter: Casey Dahlin <cdahlin>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: cagney, vanhoof
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-05 16:48:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproducer none

Description Casey Dahlin 2009-04-24 18:50:21 UTC
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

Comment 1 Jan Kratochvil 2009-05-01 15:00:31 UTC
Just a note this is a problem with the GDB Fortran modules support:
Bug 466118

Comment 2 Jan Kratochvil 2009-05-05 16:48:03 UTC
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 ***