PR debug/64817
commit54497144084900bf13c9d3ef03a292d24c97fc69
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Feb 2015 17:26:17 +0000 (1 17:26 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Feb 2015 17:26:17 +0000 (1 17:26 +0000)
tree94ca412c24ccc67dd6fdffbc04a5139e57e8e436
parent823e70b9a1131e34167ad12d2dd6cae15871a850
PR debug/64817
* cfgexpand.c (deep_ter_debug_map): New variable.
(avoid_deep_ter_for_debug): New function.
(expand_debug_expr): If TERed SSA_NAME is in
deep_ter_debug_map, use the corresponding DEBUG_EXPR_DECL
instead of trying to expand SSA_NAME's def stmt.
(expand_debug_locations): When expanding debug bind
of a DEBUG_EXPR_DECL to corresponding SSA_NAME,
temporarily remove the DEBUG_EXPR_DECL from deep_ter_debug_map's
value.
(pass_expand::execute): Call avoid_deep_ter_for_debug on
all debug bind stmts.  Delete deep_ter_debug_map after
expand_debug_location if non-NULL and clear it.

* gcc.dg/pr64817-1.c: New test.
* gcc.dg/pr64817-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220320 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cfgexpand.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr64817-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr64817-2.c [new file with mode: 0644]