From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1326 invoked by alias); 27 May 2011 17:15:59 -0000 Received: (qmail 1313 invoked by uid 22791); 27 May 2011 17:15:57 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 May 2011 17:15:42 +0000 From: "darkuranium at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49196] New: GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: darkuranium at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 27 May 2011 17:23:00 -0000 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: 2011-05/txt/msg02716.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49196 Summary: GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: darkuranium@gmail.com Created attachment 24375 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24375 Test file showing the bug The following makes GCC segfault: namespace foo { typedef void Fvoid; } using foo::Fvoid; int main() { return 0; } // < segfault reported on this line Note that the code should be compiled with debugging symbols activated (I've tested with -g or -ggdb) - without them, the bug does not get triggered. Namespaces can be nested deeper ("using foo::bar::Fvoid;") and the bug still appears. Merely using the type does NOT trigger a segfault: // these do NOT segfault: foo::Fvoid* v1; using namespace foo; Fvoid* v2; Compile the test file with: g++ -g "test.cpp" Error reported: test.cpp:25: internal compiler error: Segmentation fault: 11