OSDN Git Service

Fix var tracking ICE due to reorg.
authordavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 May 2012 19:54:19 +0000 (19:54 +0000)
committerdavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 May 2012 19:54:19 +0000 (19:54 +0000)
commit2595b34c7f510e88d532d2ea2e713afbc32d2d8c
tree1a8525e824c287ceda39c88e51953f544b03dc2e
parent57851b2650bf72bde137aff617894422c0ed0f5f
Fix var tracking ICE due to reorg.

If during reorg we delete a code label, and as a result we decide to
delete all the code following that label, we hit this condition in
jump.c:delete_related_insns():

  if (was_code_label && prev && BARRIER_P (prev))

which passes and then we proceed to delete insns until we hit a
non-deleted code label.

During this traversal, we can end up deleting a CALL, but in doing so
we will leave the var tracking note for the call arguments around.

Later in dwarf2_var_location() we will ICE, because we can't find the
CALL when we search backwards for it.

gcc/

* jump.c (delete_related_insns): If we remove a CALL, make sure
we delete it's NOTE_INSN_CALL_ARG_LOCATION note too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@187605 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/jump.c