From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29544 invoked by alias); 7 Aug 2013 07:41:16 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 29501 invoked by uid 48); 7 Aug 2013 07:41:15 -0000 From: "rayden at free dot fr" To: gdb-prs@sourceware.org Subject: [Bug fortran/15821] New: Allocatable Array used in Data Derived Type Date: Wed, 07 Aug 2013 07:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: fortran X-Bugzilla-Version: 7.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rayden at free dot fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00188.txt.bz2 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.