From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1964 invoked by alias); 17 Apr 2009 01:45:23 -0000 Received: (qmail 1836 invoked by uid 48); 17 Apr 2009 01:45:09 -0000 Date: Fri, 17 Apr 2009 01:45:00 -0000 Subject: [Bug fortran/39791] New: Bad Dwarf debug information from gfortran for a character string. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "david dot sagan at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg01452.txt.bz2 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