public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30249]  New: Pointers not given target type in GFORTRAN
@ 2006-12-18 13:30 david at allinea dot com
  2006-12-24  5:36 ` [Bug fortran/30249] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: david at allinea dot com @ 2006-12-18 13:30 UTC (permalink / raw)
  To: gcc-bugs

program struct

    REAL              , POINTER :: RD(:,:) =>NULL()





    ALLOCATE(RD(10,10))



Compile with gfortran -g struct.f90

The Dwarf output for RD leads to:
 <1><10d>: Abbrev Number: 5 (DW_TAG_pointer_type)

     DW_AT_byte_size   : 4

-- there should be a type in there (there is with most other compilers..) --
otherwise we have to interpret RD as Void* instead of double*.


-- 
           Summary: Pointers not given target type in GFORTRAN
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: david at allinea dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

* [Bug fortran/30249] Pointers not given target type in GFORTRAN
  2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
@ 2006-12-24  5:36 ` pinskia at gcc dot gnu dot org
  2008-09-18 20:04 ` burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-24  5:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-24 05:36 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |24546
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-debug
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-24 05:36:28
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

* [Bug fortran/30249] Pointers not given target type in GFORTRAN
  2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
  2006-12-24  5:36 ` [Bug fortran/30249] " pinskia at gcc dot gnu dot org
@ 2008-09-18 20:04 ` burnus at gcc dot gnu dot org
  2008-09-18 21:14 ` dominiq at lps dot ens dot fr
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-09-18 20:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2008-09-18 20:03 -------
Works for me. Can you check with a recent 4.4 compiler? There I get:

(idb) pt RD
type = REAL(4)(10)(10)

which looks OK.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

* [Bug fortran/30249] Pointers not given target type in GFORTRAN
  2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
  2006-12-24  5:36 ` [Bug fortran/30249] " pinskia at gcc dot gnu dot org
  2008-09-18 20:04 ` burnus at gcc dot gnu dot org
@ 2008-09-18 21:14 ` dominiq at lps dot ens dot fr
  2008-10-11 16:34 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-09-18 21:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dominiq at lps dot ens dot fr  2008-09-18 21:12 -------
With gdb on i686-apple-darwin9, I get either

(gdb) pt rd
type = real*4 (0:-1,0:-1)

or

(gdb) pt rd
No symbol "rd" in current context.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

* [Bug fortran/30249] Pointers not given target type in GFORTRAN
  2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
                   ` (2 preceding siblings ...)
  2008-09-18 21:14 ` dominiq at lps dot ens dot fr
@ 2008-10-11 16:34 ` burnus at gcc dot gnu dot org
  2010-04-30 21:12 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-10-11 16:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2008-10-11 16:32 -------
Jakub, I think GCC sets the wrong type for "rd". It has:

 <1><1bb>: Abbrev Number: 7 (DW_TAG_array_type)
    <1bc>   DW_AT_name  : (indirect string, offset: 0xf9): array2_real(kind=4)

whereas for ifort I get:

 <1><1fc>: Abbrev Number: 5 (DW_TAG_pointer_type)
    <1fd>   DW_AT_type        : <0x207>
    <201>   DW_AT_associated  : 5 byte block: 97 6 10 0 2e     
(DW_OP_push_object_address; DW_OP_deref; DW_OP_constu: 0; DW_OP_ne)
 <1><207>: Abbrev Number: 6 (DW_TAG_array_type)

The DW_TAG_pointer_type and the DW_AT_associated should be there; gfortran has
DW_AT_allocated which should not be there as there is no allocatable variable.

Or do I miss something? My DWARF knowledge is limited.


(In reply to comment #3)
> With gdb on i686-apple-darwin9, I get either

You know that gdb does not yet support variable-length arrays such as Fortran's
assumed-shape arrays and C's (or was it C++'s?) VLA? This is work in progress
(thanks, Jan!), see:
  http://sourceware.org/ml/gdb-patches/2008-10/msg00248.html
  http://people.redhat.com/jkratoch/vla/
Thus I was testing with the Intel Debugger (idb).


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

* [Bug fortran/30249] Pointers not given target type in GFORTRAN
  2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
                   ` (3 preceding siblings ...)
  2008-10-11 16:34 ` burnus at gcc dot gnu dot org
@ 2010-04-30 21:12 ` dfranke at gcc dot gnu dot org
  2010-04-30 21:34 ` jakub at gcc dot gnu dot org
  2010-05-08 20:30 ` dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-04-30 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dfranke at gcc dot gnu dot org  2010-04-30 21:11 -------
Has this been WAITING for 18 months now?
Any news? :)


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

* [Bug fortran/30249] Pointers not given target type in GFORTRAN
  2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
                   ` (4 preceding siblings ...)
  2010-04-30 21:12 ` dfranke at gcc dot gnu dot org
@ 2010-04-30 21:34 ` jakub at gcc dot gnu dot org
  2010-05-08 20:30 ` dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-30 21:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2010-04-30 21:34 -------
It IMHO shouldn't be DW_TAG_pointer_type, it is not a C style pointer.
DW_TAG_array_type is what is emitted and what is listed in DWARF3/4 examples
for Fortran code with POINTER variables.  And current GCC certainly emits
DW_AT_associated rather than DW_AT_allocated for POINTER vars.

So I don't see any problem on the gfortran producer side.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

* [Bug fortran/30249] Pointers not given target type in GFORTRAN
  2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
                   ` (5 preceding siblings ...)
  2010-04-30 21:34 ` jakub at gcc dot gnu dot org
@ 2010-05-08 20:30 ` dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-08 20:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dfranke at gcc dot gnu dot org  2010-05-08 20:30 -------
(In reply to comment #6)
> So I don't see any problem on the gfortran producer side.

I take this as a suggestion to close this PR.
Please reopen if misinterpreted.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30249


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

end of thread, other threads:[~2010-05-08 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-18 13:30 [Bug fortran/30249] New: Pointers not given target type in GFORTRAN david at allinea dot com
2006-12-24  5:36 ` [Bug fortran/30249] " pinskia at gcc dot gnu dot org
2008-09-18 20:04 ` burnus at gcc dot gnu dot org
2008-09-18 21:14 ` dominiq at lps dot ens dot fr
2008-10-11 16:34 ` burnus at gcc dot gnu dot org
2010-04-30 21:12 ` dfranke at gcc dot gnu dot org
2010-04-30 21:34 ` jakub at gcc dot gnu dot org
2010-05-08 20:30 ` dfranke at gcc dot gnu dot org

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).