This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/34005] [4.3 Regression] ICE: verify_ssa failed (expected an SSA_NAME object)
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Nov 2007 13:20:41 -0000
- Subject: [Bug tree-optimization/34005] [4.3 Regression] ICE: verify_ssa failed (expected an SSA_NAME object)
- References: <bug-34005-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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