On 01/15/2016 06:42 AM, Bernd Schmidt wrote:
This is a report of a crash in IRA. If you debug it with a sufficiently
old compiler, you'll find that we manage to delete some basic blocks
from within IRA. Later on, reload calls alter_reg for all unallocated
pseudos, including one that only occurs in the deleted blocks. reload
does not notice it is unused, because REG_N_REFS is still 3. We crash in
an IRA callback because the pseudo has no allocno.
Fixed as below. A similar patch cures the problem in gcc-4.6. Adding a
testcase seems pointless - the crashing code was derived from an
existing Fortran testcase with exotic options, and the whole thing only
ever triggered in one gcc version AFAICT. Current gcc can't trigger it
because it's not using reload on x86_64.
Bootstrapped and tested on x86_64-linux, ok?
OK.
jeff