Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288968 - sys-devel/gdb-7.0 fails to print contents of dummy arrays when using gfortran
Summary: sys-devel/gdb-7.0 fails to print contents of dummy arrays when using gfortran
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2009-10-13 21:47 UTC by Fred Krogh
Modified: 2012-11-05 08:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Fred Krogh 2009-10-13 21:47:09 UTC
Sorry, I've only checked this in ddd, but after switching back to gdb-6.8-r2 all is working again.

Reproducible: Always

Steps to Reproduce:
1. ddd program
2. Set breakpoint in subroutine
3. Try to print part of a dummy array

Actual Results:  

no such vector element

Expected Results:  
Print out of array part that one attempted to print.

See above.
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2009-10-23 20:59:53 UTC
Testcase would be nice with step-by-step walkthrough of what you're doing.
Comment 2 Fred Krogh 2009-10-23 21:34:42 UTC
Try this little program:

      program test
c   Testing gdb for printing arrays
      double precision C(4,4)
      do J = 1, 4
        do I = 1, 4
          C(I,J) = dble(I+J)
        end do
      end do
      call sub(C, 4)
      subroutine sub(C, IDC)
      double precision C(IDC,*)
      print '(''C(1,1), C(4,4):'', 1P, 2E12.5)', C(1,1), C(4,4)

gfortran -ggdb -o test test.f
gdb test
b 14
p c(4,4)

Note that the debugger prints 5 for c(4,4) while it should print 8.
Comment 3 Fred Krogh 2009-12-17 18:45:11 UTC
Since I've had a lot of system updates, I've tried this again, and things have changed for some reason.  Now instead of printing the wrong value, it prints "no such vector element".  It does this even at the point of the subroutine call.  It does do "p c(4,1)@5" correctly (that is it prints (5, 3, 4, 5, 6)), but will not print c(5,1), or c(1,2).

I have now filed a bug at the gdb site.