From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32591 invoked by alias); 2 Nov 2010 23:04:48 -0000 Received: (qmail 32580 invoked by uid 22791); 2 Nov 2010 23:04:47 -0000 X-SWARE-Spam-Status: No, hits=-2.6 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; Tue, 02 Nov 2010 23:04:42 +0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/46282] New: [4.6 Regression] ICE: SIGSEGV in grokbitfield (decl2.c:1054) in C++0x mode on invalid code 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: Tue, 02 Nov 2010 23:04: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/msg00230.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46282 Summary: [4.6 Regression] ICE: SIGSEGV in grokbitfield (decl2.c:1054) in C++0x mode on invalid code 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 ---- template class A { A : i() {} int i; }; -------------------- Related valgrind output: $ gcc testcase.C -std=c++0x testcase.C:4:9: error: there are no arguments to 'i' that depend on a template parameter, so a declaration of 'i' must be available [-fpermissive] testcase.C:4:9: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) ==10499== Invalid read of size 2 ==10499== at 0x55336E: grokbitfield (decl2.c:1054) ==10499== by 0x59013B: cp_parser_member_declaration (parser.c:17645) ==10499== by 0x572F13: cp_parser_type_specifier (parser.c:17392) ==10499== by 0x574787: cp_parser_decl_specifier_seq (parser.c:9890) ==10499== by 0x58CACA: cp_parser_single_declaration (parser.c:19787) ==10499== by 0x58D04D: cp_parser_template_declaration_after_export (parser.c:19700) ==10499== by 0x591DA9: cp_parser_declaration (parser.c:9369) ==10499== by 0x5904B9: cp_parser_declaration_seq_opt (parser.c:9299) ==10499== by 0x592144: c_parse_file (parser.c:3432) ==10499== by 0x667B69: c_common_parse_file (c-opts.c:1162) ==10499== by 0x9D42FF: toplev_main (toplev.c:919) ==10499== by 0x6376BBC: (below main) (in /lib64/libc-2.11.2.so) ==10499== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==10499== testcase.C:4:9: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Tested revisions: r166210 - crash r166153 - OK