Sorry, I've only checked this in ddd, but after switching back to gdb-6.8-r2 all is working again.
Steps to Reproduce:
1. ddd program
2. Set breakpoint in subroutine
3. Try to print part of a dummy array
no such vector element
Print out of array part that one attempted to print.
Testcase would be nice with step-by-step walkthrough of what you're doing.
Try this little program:
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)
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
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