PR54814 causes spill fails because reload.c:find_valid_class_1 tests only one hard register instead of all hard registers of regno:mode in rclass: http://gcc.gnu.org/PR54814 The patch was originally worked out by Bernd Schmidt and fixed a problem introduced in http://gcc.gnu.org/r190252 The patch is bootstrapped and tested on x86_64-linux and also fixes the spill fails that originally occured on avr-unknown-one. Ok to apply? PR other/54814 * reload.c (find_valid_class_1): Use in_hard_reg_set_p instead of TEST_HARD_REG_BIT.