From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11923 invoked by alias); 14 Feb 2011 05:18:45 -0000 Received: (qmail 11914 invoked by uid 22791); 14 Feb 2011 05:18:44 -0000 X-SWARE-Spam-Status: No, hits=-2.7 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, 14 Feb 2011 05:18:39 +0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/47727] [x32] internal compiler error: Segmentation fault X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com 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: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 14 Feb 2011 06:16: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-02/txt/msg01618.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47727 --- Comment #3 from H.J. Lu 2011-02-14 05:18:23 UTC --- (In reply to comment #2) > cse1 generates: > > ;; Succ edge EXIT [100.0%] (fallthru) > > ;; Insn is not within a basic block > (insn 63 57 64 (set (reg:SI 100) > (symbol_ref:SI ("__CTOR_END__") [flags 0x2] __CTOR_END__>)) -1 > (nil)) > > ;; Insn is not within a basic block > (insn 64 63 65 (parallel [ > (set (reg:SI 99) > (plus:SI (reg:SI 100) > (const_int -4 [0xfffffffffffffffc]))) > (clobber (reg:CC 17 flags)) > ]) -1 > (nil)) > > ;; Insn is not within a basic block > (insn 65 64 0 (set (reg:DI 98) > (zero_extend:DI (reg:SI 99))) -1 > (nil)) > > This may lead to the DF problem. This is because cse_insn calls fold_rtx with (gdb) call debug_rtx (x) (zero_extend:DI (reg/f:SI 95)) (gdb) call debug_rtx (insn) (insn 37 36 38 3 (set (reg/f:DI 94) (zero_extend:DI (reg/f:SI 95))) c.i:7 115 {*zero_extendsidi2_rex64} (nil)) (gdb) It leads to switch (GET_RTX_CLASS (code)) { case RTX_UNARY: { /* We can't simplify extension ops unless we know the original mode. */ if ((code == ZERO_EXTEND || code == SIGN_EXTEND) && mode_arg0 == VOIDmode) break; new_rtx = simplify_unary_operation (code, mode, const_arg0 ? const_arg0 : folded_arg0, mode_arg0); } break; Breakpoint 7, emit_insn (x=0x7ffff0d46900) at /export/gnu/import/git/gcc-x32/gcc/emit-rtl.c:4791 4791 rtx last = get_last_insn(); (gdb) bt #0 emit_insn (x=0x7ffff0d46900) at /export/gnu/import/git/gcc-x32/gcc/emit-rtl.c:4791 #1 0x00000000006f0e87 in emit_move_insn_1 (x=0x7ffff0d42dc0, y=0x7ffff0d42b40) at /export/gnu/import/git/gcc-x32/gcc/expr.c:3305 #2 0x00000000006f125a in emit_move_insn (x=0x7ffff0d42dc0, y=0x7ffff0d42b40) at /export/gnu/import/git/gcc-x32/gcc/expr.c:3395 #3 0x00000000006d503e in copy_to_mode_reg (mode=SImode, x=0x7ffff0d42b40) at /export/gnu/import/git/gcc-x32/gcc/explow.c:637 #4 0x00000000008d9656 in expand_binop_directly (mode=SImode, binoptab=0x1809e20, op0=0x7ffff0d42b40, op1=0x7ffff0dea430, target=0x7ffff0d42da0, unsignedp=1, methods=OPTAB_LIB_WIDEN, last=0x7ffff0cf1980) at /export/gnu/import/git/gcc-x32/gcc/optabs.c:1461 #5 0x00000000008d99c2 in expand_binop (mode=SImode, binoptab=0x1809e20, op0=0x7ffff0d42b40, op1=0x7ffff0dea430, target=0x7ffff0d42da0, unsignedp=1, methods=OPTAB_LIB_WIDEN) at /export/gnu/import/git/gcc-x32/gcc/optabs.c:1551 #6 0x00000000008d9185 in expand_simple_binop (mode=SImode, code=PLUS, op0=0x7ffff0d42b40, op1=0x7ffff0dea430, target=0x7ffff0d42da0, unsignedp=1, methods=OPTAB_LIB_WIDEN) at /export/gnu/import/git/gcc-x32/gcc/optabs.c:1295 #7 0x0000000000701383 in force_operand (value=0x7ffff0d473a8, target=0x7ffff0d42da0) at /export/gnu/import/git/gcc-x32/gcc/expr.c:6452 #8 0x00000000006d4fed in copy_to_mode_reg (mode=SImode, x=0x7ffff0d473a8) ---Type to continue, or q to quit--- at /export/gnu/import/git/gcc-x32/gcc/explow.c:633 #9 0x00000000008df8d7 in maybe_emit_unop_insn (icode=2221, target=0x7ffff0d42d80, op0=0x7ffff0d473a8, code=ZERO_EXTEND) at /export/gnu/import/git/gcc-x32/gcc/optabs.c:3746 #10 0x00000000008dfa49 in emit_unop_insn (icode=2221, target=0x7ffff0d42d80, op0=0x7ffff0d473a8, code=ZERO_EXTEND) at /export/gnu/import/git/gcc-x32/gcc/optabs.c:3776 #11 0x00000000006e9df4 in convert_move (to=0x7ffff0d42d80, from=0x7ffff0d473a8, unsignedp=1) at /export/gnu/import/git/gcc-x32/gcc/expr.c:612 #12 0x00000000006ea5de in convert_modes (mode=DImode, oldmode=SImode, x=0x7ffff0d473a8, unsignedp=1) at /export/gnu/import/git/gcc-x32/gcc/expr.c:791 #13 0x00000000006d4971 in convert_memory_address_addr_space (to_mode=DImode, x=0x7ffff0d473a8, as=0 '\000') at /export/gnu/import/git/gcc-x32/gcc/explow.c:408 #14 0x00000000006d488d in convert_memory_address_addr_space (to_mode=DImode, x=0x7ffff0d43d10, as=0 '\000') at /export/gnu/import/git/gcc-x32/gcc/explow.c:379 #15 0x00000000009bceb1 in simplify_unary_operation_1 (code=ZERO_EXTEND, mode=DImode, op=0x7ffff0d43d10) at /export/gnu/import/git/gcc-x32/gcc/simplify-rtx.c:1111 #16 0x00000000009bafa8 in simplify_unary_operation (code=ZERO_EXTEND, ---Type to continue, or q to quit--- mode=DImode, op=0x7ffff0d43d10, op_mode=SImode) at /export/gnu/import/git/gcc-x32/gcc/simplify-rtx.c:526 #17 0x0000000001044375 in fold_rtx (x=0x7ffff0d43d20, insn=0x7ffff0d463f0) at /export/gnu/import/git/gcc-x32/gcc/cse.c:3350 #18 0x00000000010470f8 in cse_insn (insn=0x7ffff0d463f0) at /export/gnu/import/git/gcc-x32/gcc/cse.c:4501 It generates a bunch of orphaned instructions.