The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65710 The patch was bootstrapped and tested on x86/x86-64, ppc64, and aarch64. The patch does not contain the test as it is too big. If it is reduced, the test can be committed. Committed as rev. 221956. I am also submitting analogous patch to gcc-4.9 branch. 2015-04-09 Vladimir Makarov PR target/65710 * lra-int.h (lra_bad_spill_regno_start): New. * lra.c (lra_bad_spill_regno_start): New. (lra): Set up lra_bad_spill_regno_start. Set up lra_constraint_new_regno_start unconditionally. * lra-assigns.c (spill_for): Use lra_bad_spill_regno_start for spill preferences.