public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/57266] New: [4.9 regression] comparison between signed and unsigned integer expressions in fold_binary_loc breaks m68k bootstrap
@ 2013-05-13 21:13 mikpe at it dot uu.se
  2013-05-13 21:48 ` [Bug bootstrap/57266] " glisse at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mikpe at it dot uu.se @ 2013-05-13 21:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57266

            Bug ID: 57266
           Summary: [4.9 regression] comparison between signed and
                    unsigned integer expressions in fold_binary_loc breaks
                    m68k bootstrap
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikpe at it dot uu.se

Attempting to bootstrap gcc-4.9-20130512 on m68k-linux fails with:

/mnt/scratch/objdir49/./prev-gcc/xg++ -B/mnt/scratch/objdir49/./prev-gcc/
-B/mnt/scratch/install49/m68k-unknown-linux-gnu/bin/ -nostdinc++
-B/mnt/scratch/objdir49/prev-m68k-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/mnt/scratch/objdir49/prev-m68k-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/mnt/scratch/objdir49/prev-m68k-unknown-linux-gnu/libstdc++-v3/include/m68k-unknown-linux-gnu
-I/mnt/scratch/objdir49/prev-m68k-unknown-linux-gnu/libstdc++-v3/include
-I/mnt/scratch/gcc-4.9-20130512/libstdc++-v3/libsupc++
-L/mnt/scratch/objdir49/prev-m68k-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/mnt/scratch/objdir49/prev-m68k-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-c   -g -O2 -gtoggle -DIN_GCC   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror   -DHAVE_CONFIG_H -I. -I.
-I/mnt/scratch/gcc-4.9-20130512/gcc -I/mnt/scratch/gcc-4.9-20130512/gcc/.
-I/mnt/scratch/gcc-4.9-20130512/gcc/../include
-I/mnt/scratch/gcc-4.9-20130512/gcc/../libcpp/include 
-I/mnt/scratch/gcc-4.9-20130512/gcc/../libdecnumber
-I/mnt/scratch/gcc-4.9-20130512/gcc/../libdecnumber/dpd -I../libdecnumber
-I/mnt/scratch/gcc-4.9-20130512/gcc/../libbacktrace   
/mnt/scratch/gcc-4.9-20130512/gcc/fold-const.c -o fold-const.o
/mnt/scratch/gcc-4.9-20130512/gcc/fold-const.c: In function 'tree_node*
fold_binary_loc(location_t, tree_code, tree, tree, tree)':
/mnt/scratch/gcc-4.9-20130512/gcc/fold-const.c:12430:15: error: comparison
between signed and unsigned integer expressions [-Werror=sign-compare]
    if (low >= prec)
               ^
cc1plus: all warnings being treated as errors
make[3]: *** [fold-const.o] Error 1
make[3]: Leaving directory `/mnt/scratch/objdir49/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/mnt/scratch/objdir49'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/mnt/scratch/objdir49'
make: *** [bootstrap] Error 2

At this point in the source, 'low' is of type HOST_WIDE_INT which is 'long' (32
bits on m68k) while 'prec' is of type 'unsigned int' (also 32 bits).

Caused by r198772.  Before that the code compared 'low' with TYPE_PRECISION (),
which is a smaller-than-int unsigned bitfield, so presumably promoted to int.
Casting prec to HOST_WIDE_INT here seems to work.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-16 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13 21:13 [Bug bootstrap/57266] New: [4.9 regression] comparison between signed and unsigned integer expressions in fold_binary_loc breaks m68k bootstrap mikpe at it dot uu.se
2013-05-13 21:48 ` [Bug bootstrap/57266] " glisse at gcc dot gnu.org
2013-05-14  6:19 ` glisse at gcc dot gnu.org
2013-05-14  9:56 ` rguenth at gcc dot gnu.org
2013-05-16 21:54 ` glisse at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).