summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-gimplify.c
diff options
context:
space:
mode:
authordehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-10 01:26:30 +0000
committerdehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-10 01:26:30 +0000
commitae117ec5ef443d679c705b2b752a936ce653bb60 (patch)
treeb6320b917e9625d49064449b5ac44f56d88add5f /gcc/cp/cp-gimplify.c
parent698152b443af17d49607eb983e6759e3d1e8355b (diff)
downloadgcc-ae117ec5ef443d679c705b2b752a936ce653bb60.tar.gz
gcc:
2012-10-10 Dehao Chen <dehao@google.com> * tree-eh.c (lower_try_finally_onedest): Set correct location for deallocator. * gimplify.c (gimplify_expr): Set correct location for TRY stmt. gcc/cp: 2012-10-10 Dehao Chen <dehao@google.com> * cp-gimplify.c (cp_genericize_r): Set location for TRY expr. testsuite: 2012-10-10 Dehao Chen <dehao@google.com> * g++.dg/debug/dwarf2/deallocator.C: Cover more deallocator cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192285 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r--gcc/cp/cp-gimplify.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 6178993fe89..f715e963c49 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -948,11 +948,12 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
to lower this construct before scanning it, so we need to lower these
before doing anything else. */
else if (TREE_CODE (stmt) == CLEANUP_STMT)
- *stmt_p = build2 (CLEANUP_EH_ONLY (stmt) ? TRY_CATCH_EXPR
- : TRY_FINALLY_EXPR,
- void_type_node,
- CLEANUP_BODY (stmt),
- CLEANUP_EXPR (stmt));
+ *stmt_p = build2_loc (EXPR_LOCATION (stmt),
+ CLEANUP_EH_ONLY (stmt) ? TRY_CATCH_EXPR
+ : TRY_FINALLY_EXPR,
+ void_type_node,
+ CLEANUP_BODY (stmt),
+ CLEANUP_EXPR (stmt));
else if (TREE_CODE (stmt) == IF_STMT)
{