This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string.
- From: "david dot sagan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Apr 2009 01:45:09 -0000
- Subject: [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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