https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78580
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |uros at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- /* PR rtl-optimization/78580 */ /* { dg-do compile } */ /* { dg-options "-O0 -ffixed-ebx" } */ extern const signed char a; int foo (signed char x) { return x; } int main () { foo (a); return 0; } Apparently with just -m32 we have ira_allocno_classes of: AREG,DREG,CREG,BREG,SIREG,DIREG,AD_REGS,CLOBBERED_REGS,Q_REGS,NON_Q_REGS,TLS_GOTBASE_REGS,GENERAL_REGS,FP_TOP_REG,FP_SECOND_REG,FLOAT_REGS,FLOAT_INT_REGS while with -m32 -ffixed-ebx AREG,DREG,CREG,SIREG,DIREG,AD_REGS,CLOBBERED_REGS,NON_Q_REGS,TLS_GOTBASE_REGS,GENERAL_REGS,FP_TOP_REG,FP_SECOND_REG,FLOAT_REGS,FLOAT_INT_REGS i.e. BREG and Q_REGS is missing in the latter case. update_bad_spill_attribute only initializes dead_points for the allocno classes, but then we process allocno with Q_REGS allocno class and in the latter case (sometimes) ICE because dead_points[Q_REGS] is random garbage. So, is the bug that i?86 needs Q_REGS to be an allocno class always (shall ix86_additional_allocno_class_p return true also for Q_REGS? Just for -m32 or always?), or is the bug that if Q_REGS is not an allocno class then there shouldn't be allocno with that class?