summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-10 18:28:03 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-10 18:28:03 +0000
commitf145fac4afd9586470a3337fe49279ad4a289b33 (patch)
treed86819bbb461712b2745a75881652b0b4f22b6e0 /gcc/haifa-sched.c
parent2ad972c5ac43a624aa71b28791ae54ffacff57cf (diff)
downloadgcc-f145fac4afd9586470a3337fe49279ad4a289b33.tar.gz
PR debug/44028
* haifa-sched.c (schedule_insn): When clearing INSN_VAR_LOCATION_LOC, clear also INSN_REG_USE_LIST. * gcc.dg/pr44028.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159240 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index b7f0cfce359..0dd220d7302 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1695,6 +1695,7 @@ schedule_insn (rtx insn)
sd_iterator_cond (&sd_it, &dep);)
{
rtx dbg = DEP_PRO (dep);
+ struct reg_use_data *use, *next;
gcc_assert (DEBUG_INSN_P (dbg));
@@ -1716,6 +1717,14 @@ schedule_insn (rtx insn)
INSN_VAR_LOCATION_LOC (dbg) = gen_rtx_UNKNOWN_VAR_LOC ();
df_insn_rescan (dbg);
+ /* Unknown location doesn't use any registers. */
+ for (use = INSN_REG_USE_LIST (dbg); use != NULL; use = next)
+ {
+ next = use->next_insn_use;
+ free (use);
+ }
+ INSN_REG_USE_LIST (dbg) = NULL;
+
/* We delete rather than resolve these deps, otherwise we
crash in sched_free_deps(), because forward deps are
expected to be released before backward deps. */