]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
semantics.c (cp_expand_stmt): Fix for null current_function_return_value.
authorJason Merrill <jason@gcc.gnu.org>
Tue, 10 Jul 2001 13:05:18 +0000 (09:05 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 10 Jul 2001 13:05:18 +0000 (09:05 -0400)
        * semantics.c (cp_expand_stmt): Fix for null
        current_function_return_value.

From-SVN: r43900

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 452ba42d6794d689f0485f8bb0b896e09e3e9b31..7473cab405a176d259da9161bdf7c009dfc74156 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
+
+       * semantics.c (cp_expand_stmt): Fix for null
+       current_function_return_value.
+
 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
 
        * call.c (build_op_delete_call): Initialize fn.
@@ -7,6 +12,8 @@
        (get_primary_binfo): Initialize result.
        * init.c (build_java_class_ref): Initialize name.
 
+2001-07-09  Erik Rozendaal  <dlr@acm.org>
+
        * typeck.c (unary_complex_lvalue): Do not duplicate the
        argument to modify, pre-, or post-increment when used as an
        lvalue and when the argument has side-effects.
index 66f36ab2c5c03b606bb2e0f3b9313c564d3e1e31..c82d29113817c3b7ac478e49743ddb2455ec77bc 100644 (file)
@@ -2156,8 +2156,10 @@ cp_expand_stmt (t)
   switch (TREE_CODE (t))
     {
     case CLEANUP_STMT:
-      /* Don't destroy the chosen named return value.  */
-      if (CLEANUP_DECL (t) != current_function_return_value)
+      if (CLEANUP_DECL (t)
+         && CLEANUP_DECL (t) == current_function_return_value)
+       /* Don't destroy the chosen named return value.  */;
+      else
        genrtl_decl_cleanup (CLEANUP_DECL (t), CLEANUP_EXPR (t));
       break;