diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-03 13:09:16 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-03 13:09:16 +0000 |
commit | 9f071b17b61069027754991c898273b118d85fd5 (patch) | |
tree | ffeda640fb398c179df2c1c99d7fef559802810a /gcc/cp | |
parent | e4304ad18012b0059321e29081b352d7298df56d (diff) | |
download | gcc-9f071b17b61069027754991c898273b118d85fd5.tar.gz |
PR c++/53812
* semantics.c (finish_goto_stmt): Surround computed goto argument
with CLEANUP_POINT_EXPR if needed.
* g++.dg/ext/label14.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2c524230fe4..0b3adaf7391 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-07-03 Jakub Jelinek <jakub@redhat.com> + + PR c++/53812 + * semantics.c (finish_goto_stmt): Surround computed goto argument + with CLEANUP_POINT_EXPR if needed. + 2012-07-02 Jason Merrill <jason@redhat.com> PR c++/53619 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 8e37ebb7e16..0cacf749479 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -571,6 +571,9 @@ finish_goto_stmt (tree destination) tf_warning_or_error); if (error_operand_p (destination)) return NULL_TREE; + destination + = fold_build_cleanup_point_expr (TREE_TYPE (destination), + destination); } } |