diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-29 17:13:01 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-29 17:13:01 +0000 |
commit | 7663e4b8a14f65fbb64aa9846153d321f5857ae6 (patch) | |
tree | e0f98d2c3992a14e7100fdfc1fcc2f24d5e2550d /gcc/cp | |
parent | 35c923a021c88e96c8ff422ed7f1e66f612cc45e (diff) | |
download | gcc-7663e4b8a14f65fbb64aa9846153d321f5857ae6.tar.gz |
PR c++/59916
* optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
cdtor_returns_this case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207271 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/optimize.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f2ff37abb83..594861b34b9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2014-01-29 Jason Merrill <jason@redhat.com> + PR c++/59916 + * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for + cdtor_returns_this case. + PR c++/59315 * decl.c (cxx_maybe_build_cleanup): Call mark_used. diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 1b3f10a11c5..b089432a305 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -405,8 +405,8 @@ maybe_thunk_body (tree fn, bool force) clone_result = DECL_RESULT (clone); modify = build2 (MODIFY_EXPR, TREE_TYPE (clone_result), clone_result, call); + modify = build1 (RETURN_EXPR, void_type_node, modify); add_stmt (modify); - BLOCK_VARS (block) = clone_result; } else { |