This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] m68k: Fix PR target/28911
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Kazu Hirata <kazu at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, law at redhat dot com, schwab at suse dot de
- Date: Sun, 24 Sep 2006 09:33:24 -0700
- Subject: Re: [patch] m68k: Fix PR target/28911
- References: <200609241625.k8OGPXwf017673@sparrowhawk.codesourcery.com>
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