[patch] m68k: Fix PR target/28911

Andrew Pinski pinskia@physics.uc.edu
Sun Sep 24 17:14:00 GMT 2006


On Sun, 2006-09-24 at 09:25 -0700, Kazu Hirata wrote:
> Hi,
> 
> Attached is a patch to fix target/28911.
> 
> m68k.md calls GEN_INT (0x80000000) and uses that in SImode operations,
> which is invalid.
> 
> Compiling the attached testcase trips the following gcc_assert in
> combine.c:do_SUBST.
> 
>       gcc_assert (INTVAL (newval)
> 		  == trunc_int_for_mode (INTVAL (newval), GET_MODE (oldval)));
> 
> The patch fixes the problem by using -2147483648 instead of
> 0x80000000.
Shouldn't this be "-2147483647 - 1" so we don't get a warning on a 32bit
targets compiling this code?

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list