This patch fixes an ICE on gcc.dg/pr48774.c for MIPS16, which triggered while finding the rtx cost of a BLKmode memory.
Tested on mips64-linux-gnu and applied. Richard gcc/ * config/mips/mips.c (mips16_unextended_reference_p): Test for BLKmode. Index: gcc/config/mips/mips.c =================================================================== --- gcc/config/mips/mips.c 2011-11-26 12:21:40.000000000 +0000 +++ gcc/config/mips/mips.c 2011-11-26 13:48:09.000000000 +0000 @@ -2163,7 +2163,7 @@ mips_lwxs_address_p (rtx addr) mips16_unextended_reference_p (enum machine_mode mode, rtx base, unsigned HOST_WIDE_INT offset) { - if (offset % GET_MODE_SIZE (mode) == 0) + if (mode != BLKmode && offset % GET_MODE_SIZE (mode) == 0) { if (GET_MODE_SIZE (mode) == 4 && base == stack_pointer_rtx) return offset < 256U * GET_MODE_SIZE (mode);