From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15395 invoked by alias); 18 Nov 2010 12:38:41 -0000 Received: (qmail 15386 invoked by uid 22791); 18 Nov 2010 12:38:40 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Thu, 18 Nov 2010 12:38:35 +0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/46538] New: [4.3/4.4./4.5/4.6 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__ 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: minor X-Bugzilla-Who: zsojka at seznam dot cz 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: Thu, 18 Nov 2010 12:45: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: 2010-11/txt/msg02330.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46538 Summary: [4.3/4.4./4.5/4.6 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__ Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: zsojka@seznam.cz ----- testcase.C ----- S():str(__PRETTY_FUNCTION__) {} ---------------------- Output with valgrind: $ gcc testcase.C testcase.C:1:3: error: ISO C++ forbids declaration of 'S' with no type [-fpermissive] testcase.C: In function 'int S()': testcase.C:1:5: error: only constructors take member initializers ==12873== Invalid read of size 1 ==12873== at 0x503CE7: cp_make_fname_decl (decl.c:3690) ==12873== by 0x662D44: fname_decl (c-common.c:856) ==12873== by 0x602FD5: finish_fname (semantics.c:2289) ==12873== by 0x5A7DA3: cp_parser_primary_expression (parser.c:3781) ==12873== by 0x5A7FBF: cp_parser_postfix_expression (parser.c:5137) ==12873== by 0x5A8C7B: cp_parser_unary_expression (parser.c:6109) ==12873== by 0x5A95D7: cp_parser_binary_expression (parser.c:6779) ==12873== by 0x5A9ADA: cp_parser_assignment_expression (parser.c:6995) ==12873== by 0x5ABBAE: cp_parser_parenthesized_expression_list (parser.c:5703) ==12873== by 0x5B1C7B: cp_parser_ctor_initializer_opt_and_function_body (parser.c:10667) ==12873== by 0x5B24B1: cp_parser_function_definition_after_declarator (parser.c:19647) ==12873== by 0x5B3C9B: cp_parser_init_declarator (parser.c:19576) ==12873== Address 0x74 is not stack'd, malloc'd or (recently) free'd ==12873== cc1plus: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Tested revisions: r166868 - crash 3.3.6, 4.1.2, 4.2.4, 4.3.5, 4.4.5, 4.5.1 - bails out (release/no checking) 3.4.6, 4.0.4 - OK (release/no checking)