* decl.c (stabilize_save_expr_r): Set *walk_subtrees as
appropriate.
From-SVN: r173512
2011-05-06 Jason Merrill <jason@redhat.com>
+ * decl.c (stabilize_save_expr_r): Set *walk_subtrees as
+ appropriate.
+
PR c++/48909
* semantics.c (cxx_eval_conditional_expression): Check
integer_zerop instead.
cp_walk_tree (&op, stabilize_save_expr_r, data, pset);
if (TREE_SIDE_EFFECTS (op))
TREE_OPERAND (expr, 0) = get_temp_regvar (TREE_TYPE (op), op);
+ *walk_subtrees = 0;
}
- else if (!EXPR_P (expr))
+ else if (!EXPR_P (expr) || !TREE_SIDE_EFFECTS (expr))
*walk_subtrees = 0;
return NULL;
}