From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10729 invoked by alias); 20 Jan 2011 22:02:03 -0000 Received: (qmail 10721 invoked by uid 22791); 20 Jan 2011 22:02:03 -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; Thu, 20 Jan 2011 22:01:57 +0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/47388] New: [4.6 Regression] ICE: in begin_for_stmt, at cp/semantics.c:863 with -fno-for-scope and for(;;) inside a template 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: Thu, 20 Jan 2011 22:53: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/msg02117.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47388 Summary: [4.6 Regression] ICE: in begin_for_stmt, at cp/semantics.c:863 with -fno-for-scope and for(;;) inside a template Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: zsojka@seznam.cz Created attachment 23054 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23054 reduced testcase Compiler output: $ gcc -fno-for-scope testcase.C testcase.C: In function 'void foo()': testcase.C:3:8: internal compiler error: in begin_for_stmt, at cp/semantics.c:863 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. (gdb) bt #0 fancy_abort (file=0x11f4eb0 "/mnt/svn/gcc-trunk/gcc/cp/semantics.c", line=863, function=0x11f78a3 "begin_for_stmt") at /mnt/svn/gcc-trunk/gcc/diagnostic.c:892 #1 0x000000000062aa84 in begin_for_stmt (scope=0x0, init=0x7ffff5d76aa0) at /mnt/svn/gcc-trunk/gcc/cp/semantics.c:863 #2 0x00000000005ca0f5 in cp_parser_c_for (parser=0x7ffff5d90f78, in_statement_expr=0x0, in_compound=, if_p=) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:8728 #3 cp_parser_for (parser=0x7ffff5d90f78, in_statement_expr=0x0, in_compound=, if_p=) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:8717 #4 cp_parser_iteration_statement (parser=0x7ffff5d90f78, in_statement_expr=0x0, in_compound=, if_p=) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9016 #5 cp_parser_statement (parser=0x7ffff5d90f78, in_statement_expr=0x0, in_compound=, if_p=) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:8075 #6 0x00000000005cab66 in cp_parser_statement_seq_opt (parser=0x7ffff5d90f78, in_statement_expr=0x0) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:8416 #7 0x00000000005cac9c in cp_parser_compound_statement (parser=0x7ffff5d90f78, in_statement_expr=0x0, in_try=) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:8370 #8 0x00000000005de70c in cp_parser_function_body (parser=0x7ffff5d90f78) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:16399 #9 cp_parser_ctor_initializer_opt_and_function_body (parser=0x7ffff5d90f78) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:16436 #10 0x00000000005dee82 in cp_parser_function_definition_after_declarator (parser=0x7ffff5d90f78, inline_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/parser.c:19842 #11 0x00000000005e04ce in cp_parser_function_definition_from_specifiers_and_declarator (parser=0x7ffff5d90f78, decl_specifiers=0x7fffffffd7b0, checks=0x0, function_definition_allowed_p=1 '\001', member_p=0 '\000', declares_class_or_enum=0, function_definition_p=0x7fffffffd81f "\001x\017\331\365\377\177", maybe_range_for_decl=0x0) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:19771 #12 cp_parser_init_declarator (parser=0x7ffff5d90f78, decl_specifiers=0x7fffffffd7b0, checks=0x0, function_definition_allowed_p=1 '\001', member_p=0 '\000', declares_class_or_enum=0, function_definition_p=0x7fffffffd81f "\001x\017\331\365\377\177", maybe_range_for_decl=0x0) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:14538 #13 0x00000000005e4c75 in cp_parser_single_declaration (parser=0x7ffff5d90f78, checks=0x0, member_p=0 '\000', explicit_specialization_p=0 '\000', friend_p=0x7fffffffd87f "") at /mnt/svn/gcc-trunk/gcc/cp/parser.c:20096 #14 0x00000000005e4fd6 in cp_parser_template_declaration_after_export (parser=0x7ffff5d90f78, member_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/parser.c:19946 #15 0x00000000005e9a3a in cp_parser_declaration (parser=0x7ffff5d90f78) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9444 #16 cp_parser_declaration (parser=0x7ffff5d90f78) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9395 #17 0x00000000005e833a in cp_parser_declaration_seq_opt (parser=0x7ffff5d90f78) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9374 #18 0x00000000005e9e89 in cp_parser_translation_unit () at /mnt/svn/gcc-trunk/gcc/cp/parser.c:3463 #19 c_parse_file () at /mnt/svn/gcc-trunk/gcc/cp/parser.c:25269 #20 0x00000000006be125 in c_common_parse_file () at /mnt/svn/gcc-trunk/gcc/c-family/c-opts.c:1071 #21 0x0000000000a213e6 in compile_file (argc=14, argv=0x7fffffffdad8) at /mnt/svn/gcc-trunk/gcc/toplev.c:579 #22 do_compile (argc=14, argv=0x7fffffffdad8) at /mnt/svn/gcc-trunk/gcc/toplev.c:1874 #23 toplev_main (argc=14, argv=0x7fffffffdad8) at /mnt/svn/gcc-trunk/gcc/toplev.c:1937 #24 0x00007ffff65f1bbd in __libc_start_main () from /lib/libc.so.6 #25 0x00000000004fa9d1 in _start () Tested revisions: r169065 - crash 4.5 r168785 - OK