From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31105 invoked by alias); 30 Oct 2012 15:50:02 -0000 Received: (qmail 30444 invoked by uid 48); 30 Oct 2012 15:49:42 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55124] [4.8 Regression] ICE in find_or_generate_expression, at tree-ssa-pre.c:2803 Date: Tue, 30 Oct 2012 15:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: vries at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: CC 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 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: 2012-10/txt/msg02890.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55124 vries at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #5 from vries at gcc dot gnu.org 2012-10-30 15:49:42 UTC --- tentative patch: ... Index: gcc/tree-ssa-pre.c =================================================================== --- gcc/tree-ssa-pre.c (revision 192023) +++ gcc/tree-ssa-pre.c (working copy) @@ -1657,6 +1657,16 @@ phi_translate_1 (pre_expr expr, bitmap_set_t set1, if (result) VEC_free (vn_reference_op_s, heap, newoperands); + if (result && TREE_CODE (result) == SSA_NAME) + { + gimple def_stmt = SSA_NAME_DEF_STMT (result); + basic_block def_bb = gimple_bb (def_stmt); + if (def_bb != pred + && !dominated_by_p (CDI_DOMINATORS, pred, + def_bb)) + return NULL; + } + /* We can always insert constants, so if we have a partial redundant constant load of another type try to translate it to a constant of appropriate type. */ ...