[Bug bootstrap/57266] [4.9 regression] comparison between signed and unsigned integer expressions in fold_binary_loc breaks m68k bootstrap

2013-05-16 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57266

Marc Glisse glisse at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marc Glisse glisse at gcc dot gnu.org ---
r198880 | glisse | 2013-05-14 14:06:27 +0200 (Tue, 14 May 2013) | 8 lines

2013-05-14  Marc Glisse  marc.gli...@inria.fr

PR bootstrap/57266
* fold-const.c (fold_binary_loc) shift: Use an unsigned
variable for the shift amount. Check that we shift by non-negative
amounts.


[Bug bootstrap/57266] [4.9 regression] comparison between signed and unsigned integer expressions in fold_binary_loc breaks m68k bootstrap

2013-05-14 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57266

--- Comment #2 from Marc Glisse glisse at gcc dot gnu.org ---
Created attachment 30108
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30108action=edit
patch

This passed bootstrap+testsuite on x86_64-linux-gnu. Is it enough to fix
bootstrap for you?


[Bug bootstrap/57266] [4.9 regression] comparison between signed and unsigned integer expressions in fold_binary_loc breaks m68k bootstrap

2013-05-14 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57266

--- Comment #3 from Mikael Pettersson mikpe at it dot uu.se ---
My m68k bootstrap has now recompiled fold-const.c + your patch three times
without warnings or errors.  Thanks for the quick fix.


[Bug bootstrap/57266] [4.9 regression] comparison between signed and unsigned integer expressions in fold_binary_loc breaks m68k bootstrap

2013-05-14 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57266

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0


[Bug bootstrap/57266] [4.9 regression] comparison between signed and unsigned integer expressions in fold_binary_loc breaks m68k bootstrap

2013-05-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57266

--- Comment #1 from Marc Glisse glisse at gcc dot gnu.org ---
Ah, sorry. I already had to play a bit with types to avoid similar painful
warnings on x86_64 and didn't check on other platforms. I think making low an
unsigned int would be fine (we have just checked that it is the sum of 2
numbers smaller than a precision). Note that the host_integerp checks are
suspicious, I would have expected true as second argument, especially for the
second one, to ensure it is not negative.