From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9155 invoked by alias); 7 Jan 2011 11:54:28 -0000 Received: (qmail 9145 invoked by uid 22791); 7 Jan 2011 11:54:27 -0000 X-SWARE-Spam-Status: No, hits=-2.9 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, 07 Jan 2011 11:54:21 +0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/47207] New: [4.6 Regression] [C++0x] ICE: in decl_constant_var_p, at cp/decl2.c:3563 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: normal 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: Fri, 07 Jan 2011 11:58: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-01/txt/msg00575.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47207 Summary: [4.6 Regression] [C++0x] ICE: in decl_constant_var_p, at cp/decl2.c:3563 on invalid code Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: zsojka@seznam.cz CC: gcc@abeckmann.de ----- testcase.C ----- constexpr X (X); ---------------------- The same as PR46564 comment #2, but probably different than PR46564 comment #0 Compiler output: $ gcc -std=c++0x testcase.C testcase.C:1:14: error: ISO C++ forbids declaration of 'X' with no type [-fpermissive] testcase.C:1:14: internal compiler error: in decl_constant_var_p, at cp/decl2.c:3563 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. (gdb) bt #0 fancy_abort (file=0x1210188 "/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl2.c", line=3563, function=0x1211120 "decl_constant_var_p") at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/diagnostic.c:892 #1 0x00000000005b69b8 in decl_constant_var_p (decl=0x7ffff7ee71e0) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl2.c:3563 #2 0x0000000000644318 in finish_id_expression (id_expression=0x7ffff5cdaf78, decl=0x7ffff7ee71e0, scope=0x0, idk=0x7fffffffd36c, integral_constant_expression_p=1 '\001', allow_non_integral_constant_expression_p=1 '\001', non_integral_constant_expression_p=0x7ffff5cdc02d "", template_p=0 '\000', done=1 '\001', address_p=0 '\000', template_arg_p=0 '\000', error_msg=0x7fffffffd2e8, location=102) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:3105 #3 0x00000000005d8fdc in cp_parser_primary_expression (parser=0x7ffff5cdc000, address_p=0 '\000', cast_p=, template_arg_p=0 '\000', idk=0x7fffffffd36c) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:4005 #4 0x00000000005d9c40 in cp_parser_postfix_expression (parser=0x7ffff5cdc000, address_p=0 '\000', cast_p=0 '\000', member_access_only_p=0 '\000', pidk_return=0x0) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:5163 #5 0x00000000005da8bb in cp_parser_unary_expression (parser=0x7ffff5cdc000, address_p=0 '\000', cast_p=0 '\000', pidk=0x0) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:6147 #6 0x00000000005db188 in cp_parser_binary_expression (parser=0x7ffff5cdc000, cast_p=, no_toplevel_fold_p=0 '\000', prec=PREC_NOT_OPERATOR, pidk=) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:6817 #7 0x00000000005db6a3 in cp_parser_assignment_expression (parser=0x7ffff5cdc000, cast_p=0 '\000', pidk=0x0) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:7036 #8 0x00000000005dc0f9 in cp_parser_constant_expression (parser=0x7ffff5cdc000, allow_non_constant_p=, non_constant_p=0x7fffffffd63f "") at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:7261 #9 0x00000000005dccf7 in cp_parser_parenthesized_expression_list (parser=0x7ffff5cdc000, is_attribute_list=0, cast_p=0 '\000', allow_expansion_p=1 '\001', non_constant_p=0x7fffffffd71f "") at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:5722 #10 0x00000000005e337c in cp_parser_initializer (parser=0x7ffff5cdc000, is_direct_init=0x7fffffffd71e "\001", non_constant_p=0x7fffffffd71f "") at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16458 #11 0x00000000005e42dd in cp_parser_init_declarator (parser=0x7ffff5cdc000, decl_specifiers=0x7fffffffd780, checks=0x0, function_definition_allowed_p=0 '\000', member_p=0 '\000', declares_class_or_enum=0, function_definition_p=0x7fffffffd7ef "") at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:14683 #12 0x00000000005e987b in cp_parser_simple_declaration (parser=0x7ffff5cdc000, function_definition_allowed_p=1 '\001') at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9689 #13 0x00000000005e9be7 in cp_parser_block_declaration (parser=0x7ffff5cdc000, statement_p=0 '\000') at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9587 #14 cp_parser_block_declaration (parser=0x7ffff5cdc000, statement_p=0 '\000') at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9521 #15 0x00000000005ed8f2 in cp_parser_declaration (parser=0x7ffff5cdc000) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9492 #16 cp_parser_declaration (parser=0x7ffff5cdc000) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9399 #17 0x00000000005ec41a in cp_parser_declaration_seq_opt (parser=0x7ffff5cdc000) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9378 #18 0x00000000005edf69 in cp_parser_translation_unit () at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:3461 #19 c_parse_file () at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:25214 #20 0x00000000006c2195 in c_common_parse_file () at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/c-family/c-opts.c:1071 #21 0x0000000000a24598 in compile_file (argc=14, argv=0x7fffffffdab8) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:579 #22 do_compile (argc=14, argv=0x7fffffffdab8) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1874 #23 toplev_main (argc=14, argv=0x7fffffffdab8) at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1937 #24 0x00007ffff6586bbd in __libc_start_main () from /lib/libc.so.6 #25 0x00000000004fef2d in _start () Tested revisions: r168552 - crash r165699 - OK