summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-21 18:45:29 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-21 18:45:29 +0000
commit47086a61a88b49eb7490f0a7f4f864af4ee9584b (patch)
treeecc6ff1833b54604393846a37e39a3473d3c215c /gcc/haifa-sched.c
parentdae0b5cb50db9ca6cef431ff04cc3dcb322eb943 (diff)
downloadgcc-47086a61a88b49eb7490f0a7f4f864af4ee9584b.tar.gz
PR debug/44223
* haifa-sched.c (schedule_insn): When freeing INSN_REG_USE_LIST, unchain each use from the cyclic next_regno_use chain first. * gcc.target/i386/pr44223.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159680 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index f7c087fef79..b15fe63f34a 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1721,6 +1721,12 @@ schedule_insn (rtx insn)
/* Unknown location doesn't use any registers. */
for (use = INSN_REG_USE_LIST (dbg); use != NULL; use = next)
{
+ struct reg_use_data *prev = use;
+
+ /* Remove use from the cyclic next_regno_use chain first. */
+ while (prev->next_regno_use != use)
+ prev = prev->next_regno_use;
+ prev->next_regno_use = use->next_regno_use;
next = use->next_insn_use;
free (use);
}