From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4413 invoked by alias); 28 Nov 2007 13:20:53 -0000 Received: (qmail 4372 invoked by uid 48); 28 Nov 2007 13:20:41 -0000 Date: Wed, 28 Nov 2007 13:20:00 -0000 Message-ID: <20071128132041.4371.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/34005] [4.3 Regression] ICE: verify_ssa failed (expected an SSA_NAME object) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" 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: 2007-11/txt/msg02772.txt.bz2 ------- Comment #12 from jakub at gcc dot gnu dot org 2007-11-28 13:20 ------- So, shouldn't the expression_without_side_effects_p routine just be renamed to expression_could_trap_p, otherwise it will be confused again and again with !TREE_SIDE_EFFECTS on the expr? The gimplify_cond_expr new hunk then could be + if (gimplify_ctxp->allow_rhs_cond_expr + /* If either branch has side effects or could trap, it can't be + evaluated unconditionally. */ + && !TREE_SIDE_EFFECTS (TREE_OPERAND (*expr_p, 1)) + && !expression_could_trap_p (TREE_OPERAND (*expr_p, 1)) + && !TREE_SIDE_EFFECTS (TREE_OPERAND (*expr_p, 2)) + && !expression_could_trap_p (TREE_OPERAND (*expr_p, 2))) + return gimplify_pure_cond_expr (expr_p, pre_p); This would allow side effects on condition of the COND_EXPR, and at least to me would be less confusing (and given that Diego raised that question first, I'm probably not alone). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34005