ppc: fix for pr31281, ObjC try-catch ICEs 4.2

Ian Lance Taylor iant@google.com
Tue Mar 27 23:09:00 GMT 2007


> Index: gcc.fsf.42.ice1/gcc/cse.c
> ===================================================================
> --- gcc.fsf.42.ice1/gcc/cse.c   (revision 122999)
> +++ gcc.fsf.42.ice1/gcc/cse.c   (working copy)
> @@ -4542,6 +4542,14 @@ record_jump_equiv (rtx insn, int taken)
>     op1 = fold_rtx (XEXP (XEXP (SET_SRC (set), 0), 1), insn);
> 
>     code = find_comparison_args (code, &op0, &op1, &mode0, &mode1);
> +
> +  /* If the mode is VOIDmode or a MODE_CC mode, we don't know
> +     what kinds of things are being compared, so we can't do
> +     anything with this comparison.  */
> +
> +  if (mode0 == VOIDmode || GET_MODE_CLASS (mode0) == MODE_CC)
> +    return;

I don't see any reason to kick out here if mode0 == VOIDmode.  That
seems like an unlikely case, but it also seems like a case which we
can handle.  This is not the same as the earlier call to
find_comparison_args.

I'll approve
    if (GET_MODE_CLASS (mode0) == MODE_CC)
      return;
if it fixes the bug and passes bootstrap and testing.

Thanks.

Ian



More information about the Gcc-patches mailing list