Summary: | sys-devel/gdb-7.0 fails to print contents of dummy arrays when using gfortran | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fred Krogh <fkrogh> |
Component: | [OLD] Development | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | http://sourceware.org/ml/gdb-patches/2010-03/msg00443.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Fred Krogh
2009-10-13 21:47:09 UTC
Testcase would be nice with step-by-step walkthrough of what you're doing. 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) stop end subroutine sub(C, IDC) double precision C(IDC,*) print '(''C(1,1), C(4,4):'', 1P, 2E12.5)', C(1,1), C(4,4) return end gfortran -ggdb -o test test.f gdb test b 14 r p c(4,4) c quit Note that the debugger prints 5 for c(4,4) while it should print 8. 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. upstream is working on the issue http://sourceware.org/ml/gdb-patches/2009-01/msg00251.html http://sourceware.org/ml/gdb-patches/2010-03/msg00443.html |