Bug 497567 - "unable to access variable" message debugging gfortran43 program
Summary: "unable to access variable" message debugging gfortran43 program
Keywords:
Status: CLOSED DUPLICATE of bug 466118
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-24 18:50 UTC by Casey Dahlin
Modified: 2014-06-18 08:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-05 16:48:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Reproducer (6.02 KB, application/x-gzip)
2009-04-24 18:50 UTC, Casey Dahlin
no flags Details

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 ***


Note You need to log in before you can comment on or make changes to this bug.