From: Jason Merrill Date: Fri, 6 May 2011 21:57:56 +0000 (-0400) Subject: decl.c (stabilize_save_expr_r): Set *walk_subtrees as appropriate. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e68dde1f40536d6bb7e9d65de04bacd759bb1ee9;p=gcc.git decl.c (stabilize_save_expr_r): Set *walk_subtrees as appropriate. * decl.c (stabilize_save_expr_r): Set *walk_subtrees as appropriate. From-SVN: r173512 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index af5e6d05544..70c7f3e31a3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2011-05-06 Jason Merrill + * decl.c (stabilize_save_expr_r): Set *walk_subtrees as + appropriate. + PR c++/48909 * semantics.c (cxx_eval_conditional_expression): Check integer_zerop instead. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index e766503b820..764d5dffb17 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7615,8 +7615,9 @@ stabilize_save_expr_r (tree *expr_p, int *walk_subtrees, void *data) 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; }