aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2012-09-15 00:41:53 +0000
committerDehao Chen <dehao@gcc.gnu.org>2012-09-15 00:41:53 +0000
commit820055a0ac3fcd19230eedacd223d5970d359023 (patch)
tree115ae76940c014469cce56102bf49986451e09d3 /gcc/gimplify.c
parent71452ccd312778e267d76951267d37957c421aa1 (diff)
downloadgcc-820055a0ac3fcd19230eedacd223d5970d359023.zip
gcc-820055a0ac3fcd19230eedacd223d5970d359023.tar.gz
gcc-820055a0ac3fcd19230eedacd223d5970d359023.tar.bz2
tree-eh.c (goto_queue_node): New field.
gcc: * tree-eh.c (goto_queue_node): New field. (record_in_goto_queue): New parameter. (record_in_goto_queue_label): New parameter. (lower_try_finally_dup_block): New parameter. (maybe_record_in_goto_queue): Update source location. (lower_try_finally_copy): Likewise. (honor_protect_cleanup_actions): Likewise. * gimplify.c (gimplify_expr): Reset the location to unknown. testsuite: * g++.dg/debug/dwarf2/deallocator.C: New test. libjava: * testsuite/libjava.lang/sourcelocation.java: New cases. * testsuite/libjava.lang/sourcelocation.out: New cases. From-SVN: r191338
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index f73ac1e..3188316 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -7453,6 +7453,15 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
gimple_seq eval, cleanup;
gimple try_;
+ /* Calls to destructors are generated automatically in FINALLY/CATCH
+ block. They should have location as UNKNOWN_LOCATION. However,
+ gimplify_call_expr will reset these call stmts to input_location
+ if it finds stmt's location is unknown. To prevent resetting for
+ destructors, we set the input_location to unknown.
+ Note that this only affects the destructor calls in FINALLY/CATCH
+ block, and will automatically reset to its original value by the
+ end of gimplify_expr. */
+ input_location = UNKNOWN_LOCATION;
eval = cleanup = NULL;
gimplify_and_add (TREE_OPERAND (*expr_p, 0), &eval);
gimplify_and_add (TREE_OPERAND (*expr_p, 1), &cleanup);