http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56771
Bug #: 56771 Summary: Integer Overflow? Building arm-rtems libgcc2 Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: j...@gcc.gnu.org This error occurs on some hosts. We suspect it occurs only on 32-bit hosts. It appears that some magic is occurring where a constant is too large. Host: CentOS 6.4 32-bit Host GCC: 4.4.7 20120313 (Red Hat 4.4.7-3) Target: arm-rtems4.11 Component Versions: gcc-4.7.2 gmp-5.0.5 mpc-0.8.2 mpfr-3.0.1 newlib-2.0.0 Configure command: ../gcc-4.7.2/configure \ --prefix=/home/joel/rtems-4.11-work/tools \ --bindir=/home/joel/rtems-4.11-work/tools/bin \ --exec_prefix=/home/joel/rtems-4.11-work/tools \ --includedir=/home/joel/rtems-4.11-work/tools/include \ --libdir=/home/joel/rtems-4.11-work/tools/lib \ --libexecdir=/home/joel/rtems-4.11-work/tools/libexec \ --mandir=/home/joel/rtems-4.11-work/tools/share/man \ --infodir=/home/joel/rtems-4.11-work/tools/share/info \ --datadir=/home/joel/rtems-4.11-work/tools/share \ --build=i686-linux-gnu --host=i686-linux-gnu \ --target=arm-rtems4.11 \ --disable-libstdcxx-pch \ --with-gnu-as --with-gnu-ld --verbose \ --with-newlib \ --with-system-zlib \ --disable-nls --without-included-gettext \ --disable-win32-registry \ --enable-version-specific-runtime-libs \ --disable-lto \ --enable-threads \ --disable-plugin \ --enable-newlib-io-c99-formats \ --enable-newlib-iconv \ --enable-obsolete \ --enable-languages="$languages" Failure output: /home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/./gcc/xgcc -B/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/./gcc/ -nostdinc -B/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/newlib/ -isystem /home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/newlib/targ-include -isystem /home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/gcc-4.7.2/newlib/libc/include -B/home/joel/rtems-4.11-work/tools/arm-rtems4.11/bin/ -B/home/joel/rtems-4.11-work/tools/arm-rtems4.11/lib/ -isystem /home/joel/rtems-4.11-work/tools/arm-rtems4.11/include -isystem /home/joel/rtems-4.11-work/tools/arm-rtems4.11/sys-include -g -O2 -mthumb -O2 -I../../../../gcc-4.7.2/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fno-inline -I. -I. -I../../.././gcc -I../../../../gcc-4.7.2/libgcc -I../../../../gcc-4.7.2/libgcc/. -I../../../../gcc-4.7.2/libgcc/../gcc -I../../../../gcc-4.7.2/libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../gcc-4.7.2/libgcc/libgcc2.c In file included from ../../../../gcc-4.7.2/libgcc/libgcc2.c:30:0: ../../../../gcc-4.7.2/libgcc/../gcc/coretypes.h:188:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/coretypes.h:195:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/options.h:6:0, from ../../.././gcc/tm.h:14, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:139:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:147:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:186:1: warning: enumeration values exceed range of largest integer [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:190:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:193:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/options.h:8:0, from ../../.././gcc/tm.h:14, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm-opts.h:42:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm-opts.h:45:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/tm.h:14:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../.././gcc/options.h:3626:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../.././gcc/options.h:4750:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/tm.h:15:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../.././gcc/insn-constants.h:28:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../.././gcc/insn-constants.h:186:1: warning: enumeration values exceed range of largest integer [enabled by default] ../../.././gcc/insn-constants.h:191:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../.././gcc/insn-constants.h:213:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/tm.h:25:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:128:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:335:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:1403:7: error: size of array 'call_via' is too large ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:1420:20: error: size of array 'thumb_call_via_label' is too large ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:1466:7: error: size of array 'aapcs_cprc_failed' is too large In file included from ../../../../gcc-4.7.2/libgcc/libgcc2.c:58:0: ../../../../gcc-4.7.2/libgcc/libgcc2.h:499:22: error: size of array '__popcount_tab' is too large ../../../../gcc-4.7.2/libgcc/libgcc2.h:505:1: error: size of array '__clz_tab' is too large In file included from ../../../../gcc-4.7.2/libgcc/libgcc2.h:507:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:58: ../../../../gcc-4.7.2/libgcc/longlong.h:63:1: error: size of array '__clz_tab' is too large ../../../../gcc-4.7.2/libgcc/libgcc2.c: In function '__muldi3': ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: overflow in implicit constant conversion [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] make[4]: *** [_muldi3.o] Error 1 make[4]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/thumb/libgcc' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/libgcc' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build'