This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/9395] can not acces allocatable array in fortran90


------- Additional Comments From mhp77 at gmx dot at  2010-01-11 13:10 -------
Using GNU gdb (GDB) 6.8.50.20090909-cvs from the archer repository (branch
archer-jankratochvil-vla) and GNU Fortran (GCC) 4.5.0 20091215 (experimental), I
can debug the above test program. However, if I declare an allocatable array as
a type component as follows:

program test_gdb
  implicit none
  type :: a
     real :: b = 1.0
     real, dimension( : ), allocatable :: c
  end type a
  type( a ) :: d
  allocate( d%c( 3 ) )
  d%c = 1.0
  print *, d%c
end program test_gdb

gdb issues the following error message when trying to print d%c:
(gdb) p d%c
Cannot access memory at address 0x3f800004

Interestingly, if I remove the first type component (real :: b = 1.0) gdb works
correctly.

Btw, when can we expect the Fortran enhancements to be included in main-line gdb?

Thanks!

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9395

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]