------- Comment #6 from jakub at gcc dot gnu dot org 2007-11-27 14:17 ------- I've changed that + if (gimplify_ctxp->allow_rhs_cond_expr + && !TREE_SIDE_EFFECTS (*expr_p) + && expression_without_side_effects_p (*expr_p)) + return gimplify_pure_cond_expr (expr_p, pre_p); into + if (gimplify_ctxp->allow_rhs_cond_expr + && !TREE_SIDE_EFFECTS (*expr_p)) + { + gcc_assert (expression_without_side_effects_p (*expr_p)); + return gimplify_pure_cond_expr (expr_p, pre_p); + } and so far haven't found any failure, so perhaps recalculate_side_effects wouldn't be needed. Or, was there any specific reason why TREE_SIDE_EFFECTS wasn't enough or was incorrect?
BTW, regarding the original rationale of the patch, to represent the number of iterations of a do ... while loop you could use also MAX_EXPR <1, n> and that's gimple already accepted by force_gimple_operand even without the patch. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dorit at gcc dot gnu dot | |org, rakdver at gcc dot gnu | |dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34005