OSDN Git Service

* decl.c (stabilize_save_expr_r): Set *walk_subtrees as
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 May 2011 21:57:56 +0000 (21:57 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 May 2011 21:57:56 +0000 (21:57 +0000)
appropriate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173512 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index af5e6d0..70c7f3e 100644 (file)
@@ -1,5 +1,8 @@
 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.
index e766503..764d5df 100644 (file)
@@ -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;
 }