* tree.c (stabilize_expr): Tweak logic.
authorJason Merrill <jason@redhat.com>
Wed, 30 May 2012 22:07:14 +0000 (18:07 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 30 May 2012 22:07:14 +0000 (18:07 -0400)
From-SVN: r188028

gcc/cp/ChangeLog
gcc/cp/tree.c

index f5ba6af909610d938313d604a5e6b66e5ba70340..89cbc90fdd2c18d205626fec6ce8f7a43cbf4e7b 100644 (file)
@@ -1,5 +1,7 @@
 2012-05-30  Jason Merrill  <jason@redhat.com>
 
+       * tree.c (stabilize_expr): Tweak logic.
+
        PR c++/53356
        * tree.c (stabilize_init): Side effects make the init unstable.
 
index 897d4d7bb374f48b17c5fe592668a8be6f72045e..4e7056fc364184535b4f8fbf2352f749ae993513 100644 (file)
@@ -3283,8 +3283,8 @@ stabilize_expr (tree exp, tree* initp)
     init_expr = NULL_TREE;
   else if (VOID_TYPE_P (TREE_TYPE (exp)))
     {
-      *initp = exp;
-      return void_zero_node;
+      init_expr = exp;
+      exp = void_zero_node;
     }
   /* There are no expressions with REFERENCE_TYPE, but there can be call
      arguments with such a type; just treat it as a pointer.  */