Bug 63523 - [5.0 regression] gcc/cp/pt.c -Werror=format breaks bootstrap on sparc-linux
Summary: [5.0 regression] gcc/cp/pt.c -Werror=format breaks bootstrap on sparc-linux
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 5.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-13 12:27 UTC by Mikael Pettersson
Modified: 2014-10-13 16:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Pettersson 2014-10-13 12:27:41 UTC
Attempting to bootstrap gcc-5-20141012 on sparc-linux (sparc64 w/ --build and --target overridden) fails with:

/mnt/scratch/objdir50/./prev-gcc/xg++ -B/mnt/scratch/objdir50/./prev-gcc/ -B/mnt/scratch/install50/sparc-unknown-linux/bin/ -nostdinc++ -B/mnt/scratch/objdir50/prev-sparc-unknown-linux/libstdc++-v3/src/.libs -B/mnt/scratch/objdir50/prev-sparc-unknown-linux/libstdc++-v3/libsupc++/.libs  -I/mnt/scratch/objdir50/prev-sparc-unknown-linux/libstdc++-v3/include/sparc-unknown-linux  -I/mnt/scratch/objdir50/prev-sparc-unknown-linux/libstdc++-v3/include  -I/mnt/scratch/gcc-5-20141012/libstdc++-v3/libsupc++ -L/mnt/scratch/objdir50/prev-sparc-unknown-linux/libstdc++-v3/src/.libs -L/mnt/scratch/objdir50/prev-sparc-unknown-linux/libstdc++-v3/libsupc++/.libs -c  -DIN_GCC_FRONTEND -g -O2 -gtoggle -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror   -DHAVE_CONFIG_H -I. -Icp -I/mnt/scratch/gcc-5-20141012/gcc -I/mnt/scratch/gcc-5-20141012/gcc/cp -I/mnt/scratch/gcc-5-20141012/gcc/../include -I/mnt/scratch/gcc-5-20141012/gcc/../libcpp/include -I/home/mikpe/pkgs/linux-sparc64/gmp-5.1.3/include -I/home/mikpe/pkgs/linux-sparc64/mpfr-3.1.2/include -I/home/mikpe/pkgs/linux-sparc64/mpc-1.0.2/include  -I/mnt/scratch/gcc-5-20141012/gcc/../libdecnumber -I/mnt/scratch/gcc-5-20141012/gcc/../libdecnumber/dpd -I../libdecnumber -I/mnt/scratch/gcc-5-20141012/gcc/../libbacktrace    -o cp/pt.o -MT cp/pt.o -MMD -MP -MF cp/.deps/pt.TPo /mnt/scratch/gcc-5-20141012/gcc/cp/pt.c
/mnt/scratch/gcc-5-20141012/gcc/cp/pt.c: In function 'void print_template_statistics()':
/mnt/scratch/gcc-5-20141012/gcc/cp/pt.c:22329:40: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Werror=format=]
     decl_specializations->collisions ());
                                        ^
/mnt/scratch/gcc-5-20141012/gcc/cp/pt.c:22329:40: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka unsigned int}' [-Werror=format=]
/mnt/scratch/gcc-5-20141012/gcc/cp/pt.c:22333:40: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Werror=format=]
     type_specializations->collisions ());
                                        ^
/mnt/scratch/gcc-5-20141012/gcc/cp/pt.c:22333:40: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka unsigned int}' [-Werror=format=]
cc1plus: all warnings being treated as errors
make[3]: *** [cp/pt.o] Error 1
make[3]: Leaving directory `/mnt/scratch/objdir50/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/mnt/scratch/objdir50'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/mnt/scratch/objdir50'
make: *** [bootstrap] Error 2

The previous weekly snapshot, gcc-5-20141005, bootstrapped fine.

Configuration options:
/mnt/scratch/gcc-5-20141012/configure --prefix=/mnt/scratch/install50 --with-gmp=/home/mikpe/pkgs/linux-sparc64/gmp-5.1.3 --with-mpfr=/home/mikpe/pkgs/linux-sparc64/mpfr-3.1.2 --with-mpc=/home/mikpe/pkgs/linux-sparc64/mpc-1.0.2 --enable-multilib --disable-plugin --disable-lto --disable-nls --enable-threads=posix --enable-checking=release --disable-libmudflap --enable-languages=c,ada,c++,fortran --build=sparc-unknown-linux --target=sparc-unknown-linux --with-cpu=ultrasparc --enable-targets=all --disable-libsanitizer
Comment 1 Igor Zamyatin 2014-10-13 12:32:23 UTC
Also on i686
Comment 2 H.J. Lu 2014-10-13 16:10:24 UTC
Should be fixed by r216151.