https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80476
Bug ID: 80476
Summary: GCC 7 can't be compiled with bootstrap-O3
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: mikulas at artax dot karlin.mff.cuni.cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
When compiling GCC 7 with -O3 (using the configure flag
--with-build-config=bootstrap-O3), it fails due to uninitialized variables.
This is the script to compile GCC:
#!/bin/sh
set -e
MAKEFLAGS=-j12
export MAKEFLAGS
../gcc-7-20170416/configure \
--prefix=/usr/local/gcc/ \
--enable-lto \
--with-system-zlib \
--enable-languages=c,c++ \
--enable-multilib \
--with-multilib-list=m32,m64,mx32 \
--with-build-config=bootstrap-O3 \
&&
nice -n 20 make bootstrap
This is the result:
In file included from ../../gcc-7-20170416/gcc/target.h:53:0,
from ../../gcc-7-20170416/gcc/ira-color.c:25:
../../gcc-7-20170416/gcc/hard-reg-set.h: In function 'bool
ira_reassign_pseudos(int*, int, HARD_REG_ELT_TYPE*, HARD_REG_ELT_TYPE (*)[2],
HARD_REG_ELT_TYPE (*)[2], bitmap)':
../../gcc-7-20170416/gcc/hard-reg-set.h:174:18: error: '*((void*)& saved +24)'
may be used uninitialized in this function [-Werror=maybe-uninitialized]
scan_tp_[1] = scan_fp_[1]; } while (0)
^
../../gcc-7-20170416/gcc/ira-color.c:4327:16: note: '*((void*)& saved +24)' was
declared here
HARD_REG_SET saved[2];
^~~~~
In file included from ../../gcc-7-20170416/gcc/target.h:53:0,
from ../../gcc-7-20170416/gcc/ira-color.c:25:
../../gcc-7-20170416/gcc/hard-reg-set.h:173:18: error: '*((void*)& saved +16)'
may be used uninitialized in this function [-Werror=maybe-uninitialized]
scan_tp_[0] = scan_fp_[0]; \
^
../../gcc-7-20170416/gcc/ira-color.c:4327:16: note: '*((void*)& saved +16)' was
declared here
HARD_REG_SET saved[2];
^~~~~
In file included from ../../gcc-7-20170416/gcc/target.h:53:0,
from ../../gcc-7-20170416/gcc/ira-color.c:25:
../../gcc-7-20170416/gcc/hard-reg-set.h:174:18: error: '*((void*)& saved +8)'
may be used uninitialized in this function [-Werror=maybe-uninitialized]
scan_tp_[1] = scan_fp_[1]; } while (0)
^
../../gcc-7-20170416/gcc/ira-color.c:4327:16: note: '*((void*)& saved +8)' was
declared here
HARD_REG_SET saved[2];
^~~~~
In file included from ../../gcc-7-20170416/gcc/target.h:53:0,
from ../../gcc-7-20170416/gcc/ira-color.c:25:
../../gcc-7-20170416/gcc/hard-reg-set.h:173:18: error: 'saved' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
scan_tp_[0] = scan_fp_[0]; \
^
../../gcc-7-20170416/gcc/ira-color.c:4327:16: note: 'saved' was declared here
HARD_REG_SET saved[2];
^~~~~
cc1plus: all warnings being treated as errors
Makefile:1106: návod pro cíl ,,ira-color.o" selhal
make[3]: *** [ira-color.o] Chyba 1
make[3]: *** Čeká se na nedokončené úlohy...
rm fsf-funding.pod gcov.pod gpl.pod cpp.pod gfdl.pod gcc.pod gcov-dump.pod
gcov-tool.pod
make[3]: Opouští se adresář ,,/usr/src/gcc-7.1.0-test/gcc"
Makefile:4588: návod pro cíl ,,all-stage2-gcc" selhal
make[2]: *** [all-stage2-gcc] Chyba 2
make[2]: Opouští se adresář ,,/usr/src/gcc-7.1.0-test"
Makefile:22065: návod pro cíl ,,stage2-bubble" selhal
make[1]: *** [stage2-bubble] Chyba 2
make[1]: Opouští se adresář ,,/usr/src/gcc-7.1.0-test"
Makefile:22268: návod pro cíl ,,bootstrap" selhal
make: *** [bootstrap] Chyba 2