summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-10 13:05:18 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-10 13:05:18 +0000
commite062b7912cd7c750517624ccf225fc97cd33da41 (patch)
treece607e9f28be94316958753878bc0c4de6f43652
parent7625128cdb05f38540c9ad0311b7efee8d1f85ad (diff)
downloadppe42-gcc-e062b7912cd7c750517624ccf225fc97cd33da41.tar.gz
ppe42-gcc-e062b7912cd7c750517624ccf225fc97cd33da41.zip
* semantics.c (cp_expand_stmt): Fix for null
current_function_return_value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43900 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/semantics.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 452ba42d679..7473cab405a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 66f36ab2c5c..c82d2911381 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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;
OpenPOWER on IntegriCloud