From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15609 invoked by alias); 5 Apr 2011 12:21:37 -0000 Received: (qmail 15600 invoked by uid 22791); 5 Apr 2011 12:21:37 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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, 05 Apr 2011 12:20:43 +0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/48441] [4.7 Regression] ICE in mark_oprs_set X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: steven at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 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: Tue, 05 Apr 2011 12:21: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-04/txt/msg00425.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48441 --- Comment #7 from Steven Bosscher 2011-04-05 12:03:38 UTC --- OK, confirmed that cprop_insn makes the insn deleted, in the second CPROP pass: Breakpoint 3, one_cprop_pass () at ../../trunk/gcc/cprop.c:1799 1799 changed |= cprop_insn (insn); (gdb) p debug_rtx(insn) (jump_insn 214 213 303 29 (set (pc) (if_then_else (eq (reg/v:SI 202 [ rval ]) (const_int 7 [0x7])) (label_ref:SI 303) (pc))) charset.i:106 25 {*pa.md:1330} (expr_list:REG_BR_PROB (const_int 9550 [0x254e]) (nil)) -> 303) $12 = void (gdb) next 1805 if (! NOTE_P (insn)) (gdb) p debug_rtx(insn) (jump_insn/v 214 213 303 29 (set (pc) (if_then_else (eq (reg/v:SI 202 [ rval ]) (const_int 7 [0x7])) (label_ref:SI 303) (pc))) charset.i:106 25 {*pa.md:1330} (expr_list:REG_BR_PROB (const_int 9550 [0x254e]) (nil)) -> 303) $13 = void (gdb) CPROP finds that rval==22 and folds away the comparsion "(eq (rval==22) (7))" in cprop_jump, and then goes on to: /* If this is now a no-op delete it, otherwise this must be a valid insn. */ if (new_rtx == pc_rtx) delete_insn (jump); I also verified that the same occurred before my patch, i.e. we were doing mark_oprs_set on dead/deleted insns. I'll submit the patch.