From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 618 invoked by alias); 9 Feb 2004 10:01:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 611 invoked by alias); 9 Feb 2004 10:01:12 -0000 Date: Mon, 09 Feb 2004 10:01:00 -0000 From: "gcc-bugzilla at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040209100109.14079.konstantin@mysql.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/14079] New: wrong debug info for extern boolean variable in debug mode X-Bugzilla-Reason: CC X-SW-Source: 2004-02/txt/msg00989.txt.bz2 List-Id: Compile a program attached in how-to-repeat section with c++ -g -ggdb foo.cc Run it in gdb. Exec: b main p sizeof(bool) p sizeof(foo) p sizeof(bar) p &foo p &bar set foo=1 set bar=0 set foo=1 Note, that nevertheless pritnf() output is correct. Environment: System: Linux oak 2.4.21-99-athlon #1 Wed Sep 24 13:34:32 UTC 2003 i686 athlon i386 GNU/Linux Architecture: i686 OS: SuSE Linux 9.0, GNU gdb 5.3.92 from default package. Note, that the bug reproduces on the other developers SuSE 9.0 boxes, having earlier versions of GCC. host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-3.3.2/configure --enable-threads=posix --enable-languages=c,c++ How-To-Repeat: -- cut (foo.cc) #include extern bool foo; bool foo, bar; int main() { printf("%d, %d, %d\n", sizeof(bool), sizeof(foo), sizeof(bar)); } -- end cut ------- Additional Comments From konstantin at mysql dot com 2004-02-09 10:01 ------- Fix: Work around is not use bool if bool is extern, because they are not operable in debug mode. -- Summary: wrong debug info for extern boolean variable in debug mode Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: konstantin at mysql dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14079