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/15821] New: Allocatable Array used in Data Derived Type


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

            Bug ID: 15821
           Summary: Allocatable Array used in Data Derived Type
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
          Assignee: unassigned at sourceware dot org
          Reporter: rayden at free dot fr

Hi all,

Memory adresses are wrong with Fortran syntaxt if allocatable array is used
inside a data derived type.

FORTRAN CONTEXT:
  TYPE L_BUFFER
    REAL, DIMENSION(:) , POINTER ::   ALPHA
  END TYPE L_BUFFER                           
  ALLOCATE(BUFFER%ALPHA(NEL)   ,STAT=ERR)
  BUFFER%ALPHA(5)=0.0078

GDB Example :
  (gdb) p & BUFFER%ALPHA(5)
  $1 = 3.9525251667299724e-323 (is incorrect)

  (gdb) p *((double*)(BUFFER%ALPHA)+5-1)
  $1 = 0.0078 (is correct)

This is a heavy syntaxt which is very annoyning. 
Is it planned to support Fortran syntaxt for such situations ?

Thank you very much for your help.
Thierry

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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