diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-24 13:41:30 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-24 13:41:30 +0000 |
commit | dfecf957a06c647768ef1edf7e4b6f642d70c24f (patch) | |
tree | 20f32d2f9c282d0e29f5a06f4b4707bb295fab42 /gcc/cfgexpand.c | |
parent | 8daf0dfecb04cbf22d4dfa8131743a35c4e27142 (diff) | |
download | gcc-dfecf957a06c647768ef1edf7e4b6f642d70c24f.tar.gz |
PR debug/19192
PR debug/43479
* cfgexpand.c (gimple_assign_rhs_to_tree): Also set TREE_BLOCK
from gimple_block.
* expr.c (expand_expr_real): Restore previous
curr_insn_source_location and curr_insn_block after
expand_expr_real_1 call.
(expand_expr_real_1) <case SSA_NAME>: Call expand_expr_real
instead of expand_expr_real_1.
* gcc.dg/guality/pr43479.c: New test.
* gcc.dg/debug/dwarf2/inline2.c (third): Make a a global var
and add volatile keyword.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157693 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index fcae897a392..a797af9a167 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -77,8 +77,12 @@ gimple_assign_rhs_to_tree (gimple stmt) { t = gimple_assign_rhs1 (stmt); /* Avoid modifying this tree in place below. */ - if (gimple_has_location (stmt) && CAN_HAVE_LOCATION_P (t) - && gimple_location (stmt) != EXPR_LOCATION (t)) + if ((gimple_has_location (stmt) && CAN_HAVE_LOCATION_P (t) + && gimple_location (stmt) != EXPR_LOCATION (t)) + || (gimple_block (stmt) + && currently_expanding_to_rtl + && EXPR_P (t) + && gimple_block (stmt) != TREE_BLOCK (t))) t = copy_node (t); } else @@ -86,6 +90,8 @@ gimple_assign_rhs_to_tree (gimple stmt) if (gimple_has_location (stmt) && CAN_HAVE_LOCATION_P (t)) SET_EXPR_LOCATION (t, gimple_location (stmt)); + if (gimple_block (stmt) && currently_expanding_to_rtl && EXPR_P (t)) + TREE_BLOCK (t) = gimple_block (stmt); return t; } |