[PATCH] ICE caused by calling simplify_subreg with BLKmode
Ian Lance Taylor
iant@google.com
Thu Nov 9 17:19:00 GMT 2006
Andreas Krebbel <Andreas.Krebbel@de.ibm.com> writes:
> 2006-11-09 Andreas Krebbel <krebbel1@de.ibm.com>
>
> * simplify-rtx.c (avoid_constant_pool_reference): Avoid calling
> simplify_subreg with BLKmode outer mode.
>
>
> 2006-11-09 Andreas Krebbel <krebbel1@de.ibm.com>
>
> * gcc.dg/20061109-1.c: New testcase.
>
>
> Index: gcc/simplify-rtx.c
> ===================================================================
> *** gcc/simplify-rtx.c.orig 2006-11-07 10:10:30.000000000 +0100
> --- gcc/simplify-rtx.c 2006-11-08 16:07:36.000000000 +0100
> *************** avoid_constant_pool_reference (rtx x)
> *** 139,144 ****
> --- 139,146 ----
> switch (GET_CODE (x))
> {
> case MEM:
> + if (GET_MODE (x) == BLKmode)
> + return x;
> break;
>
> case FLOAT_EXTEND:
Don't do the test in the switch statement. I think that is a little
confusing since the switch statement only and always passes for MEM
anyhow--doing the test there means double-checking that. Just move
the test below the switch:
default:
return x;
}
if (GET_MODE (x) == BLKmode)
return x;
addr = XEXP (x, 0);
Patch is OK with that change.
Thanks.
Ian
More information about the Gcc-patches
mailing list