From 9f071b17b61069027754991c898273b118d85fd5 Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 3 Jul 2012 13:09:16 +0000 Subject: 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 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/semantics.c | 3 +++ 2 files changed, 9 insertions(+) (limited to 'gcc/cp') 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 + + PR c++/53812 + * semantics.c (finish_goto_stmt): Surround computed goto argument + with CLEANUP_POINT_EXPR if needed. + 2012-07-02 Jason Merrill 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); } } -- cgit v1.2.1