This patch fixes an ICE in sched-deps.c due to a dereference of an empty list.
The problem is in handling of DEBUG_INSNs and its peculiarity of disregarding requests to free dependence lists in certain cases. This patch fixes up an instance of disregarding such a request going wrong. Along the way the patch simplifies add_dependence_list_and_free to an equivalent, but simpler, code. [Rant: I consider this peculiarity of handling DEBUG_INSNs in sched-deps to be a hack and think that DEBUG_INSNs should be handled differently by creating a new type of dependencies. On the other hand, I understand that such a change is not trivial to implement and that the current implementation has a great argument for it -- that it works.] Tested on mips-linux-gnu with no regressions. OK to apply? Thank you, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics
sched-deps-fix.ChangeLog
Description: Binary data
sched-deps-fix.patch
Description: Binary data