From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11718 invoked by alias); 21 Nov 2011 22:36:13 -0000 Received: (qmail 11520 invoked by uid 22791); 21 Nov 2011 22:36:12 -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; Mon, 21 Nov 2011 22:35:18 +0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/51262] New: [4.7 Regression] ICE: SIGSEGV in primary_template_instantiation_p (pt.c:2874) with -flto -g Date: Tue, 22 Nov 2011 00:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug 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 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-11/txt/msg02159.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51262 Bug #: 51262 Summary: [4.7 Regression] ICE: SIGSEGV in primary_template_instantiation_p (pt.c:2874) with -flto -g Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned@gcc.gnu.org ReportedBy: zsojka@seznam.cz Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 25875 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25875 reduced testcase Compiler output: $ gcc -flto -fcompare-debug testcase.C ==20321== Invalid read of size 2 ==20321== at 0x5C0904: primary_template_instantiation_p(tree_node const*) (pt.c:2874) ==20321== by 0x5C118D: get_primary_template_innermost_parameters(tree_node const*) (pt.c:2902) ==20321== by 0x899E19: gen_tagged_type_die(tree_node*, die_struct*, debug_info_usage) (dwarf2out.c:20045) ==20321== by 0x886C5F: gen_type_die_with_usage(tree_node*, die_struct*, debug_info_usage) (dwarf2out.c:18952) ==20321== by 0x89C8A6: gen_decl_die(tree_node*, tree_node*, die_struct*) (dwarf2out.c:19512) ==20321== by 0x8A1C2F: decls_for_scope(tree_node*, die_struct*, int) (dwarf2out.c:19125) ==20321== by 0x8A2043: gen_block_die(tree_node*, die_struct*, int) (dwarf2out.c:18111) ==20321== by 0x8A1CD5: decls_for_scope(tree_node*, die_struct*, int) (dwarf2out.c:19139) ==20321== by 0x89DB1E: gen_subprogram_die(tree_node*, die_struct*) (dwarf2out.c:17555) ==20321== by 0x89C214: gen_decl_die(tree_node*, tree_node*, die_struct*) (dwarf2out.c:19489) ==20321== by 0x8A5818: dwarf2out_function_decl(tree_node*) (dwarf2out.c:19871) ==20321== by 0x8FEF14: rest_of_handle_final() (final.c:4349) ==20321== by 0xA6ED94: execute_one_pass(opt_pass*) (passes.c:2074) ==20321== by 0xA6F134: execute_pass_list(opt_pass*) (passes.c:2129) ==20321== by 0xA6F146: execute_pass_list(opt_pass*) (passes.c:2130) ==20321== by 0xA6F146: execute_pass_list(opt_pass*) (passes.c:2130) ==20321== by 0xBD0CED: tree_rest_of_compilation(tree_node*) (tree-optimize.c:420) ==20321== by 0x8249C9: cgraph_expand_function(cgraph_node*) (cgraphunit.c:1819) ==20321== by 0x826B05: cgraph_optimize() (cgraphunit.c:1984) ==20321== by 0x826ED9: cgraph_finalize_compilation_unit() (cgraphunit.c:1327) ==20321== by 0x64880A: cp_write_global_declarations() (decl2.c:4050) ==20321== by 0xB64033: toplev_main(int, char**) (toplev.c:581) ==20321== by 0x674ED2C: (below main) (in /lib64/libc-2.12.2.so) ==20321== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==20321== testcase.C: In function 'bar(int*)void*': testcase.C:11:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. gcc: error: during -fcompare-debug recompilation gcc: error: testcase.C: -fcompare-debug failure (length) Tested revisions: r181550 - crash r181532 - crash r181508 - crash r181442 - OK