public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15821] New: Allocatable Array used in Data Derived Type
@ 2013-08-07  7:41 rayden at free dot fr
  2013-08-07  7:42 ` [Bug fortran/15821] " rayden at free dot fr
  2022-11-12 13:25 ` gnikit at duck dot com
  0 siblings, 2 replies; 3+ messages in thread
From: rayden at free dot fr @ 2013-08-07  7:41 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-12 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07  7:41 [Bug fortran/15821] New: Allocatable Array used in Data Derived Type rayden at free dot fr
2013-08-07  7:42 ` [Bug fortran/15821] " rayden at free dot fr
2022-11-12 13:25 ` gnikit at duck dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).