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
Andrew Pinski <pinskia@physics.uc.edu> writes:
> 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?
Probably. gen_int_mode (0x80000000, SImode) is another alternative,
and easier to read IMO.
Richard