end of the regno_reg_class array.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173015
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-04-27 Nick Clifton <nickc@redhat.com>
+
+ * config/mcore/mcore.h (REGNO_REG_CLASS): Do not index beyond the
+ end of the regno_reg_class array.
+
2011-04-27 Jakub Jelinek <jakub@redhat.com>
PR c/48742
or could index an array. */
extern const enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
-#define REGNO_REG_CLASS(REGNO) regno_reg_class[REGNO]
+#define REGNO_REG_CLASS(REGNO) ((REGNO) < FIRST_PSEUDO_REGISTER ? regno_reg_class[REGNO] : NO_REGS)
/* When this hook returns true for MODE, the compiler allows
registers explicitly used in the rtl to be used as spill registers