From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19877 invoked by alias); 22 Jun 2010 22:55:08 -0000 Received: (qmail 19794 invoked by uid 48); 22 Jun 2010 22:54:58 -0000 Date: Tue, 22 Jun 2010 22:55:00 -0000 Subject: [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jyasskin 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: 2010-06/txt/msg02253.txt.bz2 $ cat test.ii # 1 "bad.h" 1 template struct MisplacedDbg; # 1 "good.cc" struct Arg; typedef MisplacedDbg Typedef; template struct Base { virtual ~Base() { } }; template struct MisplacedDbg : public Base { }; static MisplacedDbg static_var; $ g++-4.6svn -c -g test.ii $ objdump -d -l test.o|grep -B2 'bad.h:1' 0000000000000000 <_ZN12MisplacedDbgI3ArgEC1Ev>: MisplacedDbg(): /home/jyasskin/tmp/bad.h:1 -- 0000000000000000 <_ZN12MisplacedDbgI3ArgED1Ev>: ~MisplacedDbg(): /home/jyasskin/tmp/bad.h:1 $ This causes problems for Gold's ODR violation detector. -- Summary: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jyasskin at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641