public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "david dot sagan at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/39791]  New: Bad Dwarf debug information from gfortran for a character string.
Date: Fri, 17 Apr 2009 01:45:00 -0000	[thread overview]
Message-ID: <bug-39791-17588@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2009-04-17  1:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  1:45 david dot sagan at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-39791-17588@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).