public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39791]  New: Bad Dwarf debug information from gfortran for a character string.
@ 2009-04-17  1:45 david dot sagan at gmail dot com
  2009-04-17  4:40 ` [Bug fortran/39791] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: david dot sagan at gmail dot com @ 2009-04-17  1:45 UTC (permalink / raw)
  To: gcc-bugs

A simple example shows the problem:

program test
  implicit none
  integer i
  character(16) abc
  abc = "abc"
  i = 7
end program

Compile with:
  gfortran -g -O0 test.f90

Run with gdb and "whatis abc" produces:
  type = character(kind=1) (16)

That is, gdb thinks that the variable abc is an array of length 16 with each
component in the array being a singe character. I verified with the totalview
debugger that the problem was with the compiler and not gdb. Interestingly
enough, version 4.1.1 does *not* have this problem. This bug definitely makes
debugging a program more painful.


-- 
           Summary: Bad Dwarf debug information from gfortran for a
                    character string.
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: david dot sagan at gmail dot com


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


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

* [Bug fortran/39791] Bad Dwarf debug information from gfortran for a character string.
  2009-04-17  1:45 [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string david dot sagan at gmail dot com
@ 2009-04-17  4:40 ` burnus at gcc dot gnu dot org
  2009-04-21 17:45 ` [Bug fortran/39791] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-04-17  4:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2009-04-17 04:40 -------
I think this was recently fixed. At least with GCC 4.4.0 20090414 and with the
latest 4.5 trunk:

(gdb) pt abc
type = character*16
(gdb) p abc
$1 = 'abc', ' ' <repeats 13 times>

I can reproduce the problem with gfortran 4.3.x


-- 


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


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

* [Bug fortran/39791] [4.3 Regression] Bad Dwarf debug information from gfortran for a character string.
  2009-04-17  1:45 [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string david dot sagan at gmail dot com
  2009-04-17  4:40 ` [Bug fortran/39791] " burnus at gcc dot gnu dot org
@ 2009-04-21 17:45 ` pinskia at gcc dot gnu dot org
  2009-04-22 13:35 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-21 17:45 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-debug
            Summary|Bad Dwarf debug information |[4.3 Regression] Bad Dwarf
                   |from gfortran for a         |debug information from
                   |character string.           |gfortran for a character
                   |                            |string.
   Target Milestone|---                         |4.3.4


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


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

* [Bug fortran/39791] [4.3 Regression] Bad Dwarf debug information from gfortran for a character string.
  2009-04-17  1:45 [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string david dot sagan at gmail dot com
  2009-04-17  4:40 ` [Bug fortran/39791] " burnus at gcc dot gnu dot org
  2009-04-21 17:45 ` [Bug fortran/39791] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2009-04-22 13:35 ` rguenth at gcc dot gnu dot org
  2009-04-24  7:19 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-22 13:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-04-22 13:35 -------
Fortran, P4.  Confirmed as of comment #1.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.3.3
      Known to work|                            |4.1.1 4.4.0
           Priority|P3                          |P4
   Last reconfirmed|0000-00-00 00:00:00         |2009-04-22 13:35:09
               date|                            |


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


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

* [Bug fortran/39791] [4.3 Regression] Bad Dwarf debug information from gfortran for a character string.
  2009-04-17  1:45 [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string david dot sagan at gmail dot com
                   ` (2 preceding siblings ...)
  2009-04-22 13:35 ` rguenth at gcc dot gnu dot org
@ 2009-04-24  7:19 ` burnus at gcc dot gnu dot org
  2009-04-24  7:25 ` burnus at gcc dot gnu dot org
  2009-05-11  9:17 ` burnus at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-04-24  7:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2009-04-24 07:19 -------
Subject: Bug 39791

Author: burnus
Date: Fri Apr 24 07:19:12 2009
New Revision: 146672

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146672
Log:
2009-04-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/39791
        Backport from mainline:

        2008-08-22  Jakub Jelinek  <jakub@redhat.com>

        * dwarf2out.c (add_subscript_info): Stop on Fortran
        * TYPE_STRING_FLAG
        types.
        (gen_array_type_die): Emit DW_TAG_string_type for Fortran
        character types.


Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/dwarf2out.c


-- 


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


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

* [Bug fortran/39791] [4.3 Regression] Bad Dwarf debug information from gfortran for a character string.
  2009-04-17  1:45 [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string david dot sagan at gmail dot com
                   ` (3 preceding siblings ...)
  2009-04-24  7:19 ` burnus at gcc dot gnu dot org
@ 2009-04-24  7:25 ` burnus at gcc dot gnu dot org
  2009-05-11  9:17 ` burnus at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-04-24  7:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2009-04-24 07:25 -------
FIXED for 4.3.4. The original patch for the 4.4 trunk was
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01700.html


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/39791] [4.3 Regression] Bad Dwarf debug information from gfortran for a character string.
  2009-04-17  1:45 [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string david dot sagan at gmail dot com
                   ` (4 preceding siblings ...)
  2009-04-24  7:25 ` burnus at gcc dot gnu dot org
@ 2009-05-11  9:17 ` burnus at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-05-11  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from burnus at gcc dot gnu dot org  2009-05-11 09:17 -------
The patch caused a regression, see PR 40061


-- 


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


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

end of thread, other threads:[~2009-05-11  9:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-17  1:45 [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string david dot sagan at gmail dot com
2009-04-17  4:40 ` [Bug fortran/39791] " burnus at gcc dot gnu dot org
2009-04-21 17:45 ` [Bug fortran/39791] [4.3 Regression] " pinskia at gcc dot gnu dot org
2009-04-22 13:35 ` rguenth at gcc dot gnu dot org
2009-04-24  7:19 ` burnus at gcc dot gnu dot org
2009-04-24  7:25 ` burnus at gcc dot gnu dot org
2009-05-11  9:17 ` burnus 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).