https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64636
Bug ID: 64636 Summary: Bootstrapping gcc-4.9.2 fails if lto is enabled Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: carson at taltos dot org LTO bootstrap throws an error on libiberty/regex.c. Removing the LTO compile options results in a successful compilation of regex.o gcc 4.9.2 Solaris 11.2 gcc configure command: ../gcc-4.9.2/configure --prefix=/Tools/SunOS_5.11_i86pc_amd64/gcc-4.9.2-allgnu --with-local-prefix=/Tools/SunOS_5.11_i86pc_amd64/gcc-4.9.2-allgnu --with-gnu-as --with-as=/usr/local/bin/gas --with-gnu-ld --with-ld=/usr/local/bin/gld --with-cpu=native --with-arch=native --enable-languages=c,c++ --with-gmp=/Tools/SunOS_5.11_i86pc_amd64/gmp-6.0.0a --with-mpfr=/Tools/SunOS_5.11_i86pc_amd64/mpfr-3.1.2 --with-mpc=/Tools/SunOS_5.11_i86pc_amd64/mpc-1.0.2 --with-isl=/Tools/SunOS_5.11_i86pc_amd64/isl-0.12.2 --with-cloog=/Tools/SunOS_5.11_i86pc_amd64/cloog-0.18.1 CC='gcc -m64' CXX='g++ -m64' LDFLAGS='-R/Tools/SunOS_5.11_i86pc_amd64/gmp-6.0.0a/lib -R/Tools/SunOS_5.11_i86pc_amd64/mpfr-3.1.2/lib -R/Tools/SunOS_5.11_i86pc_amd64/mpc-1.0.2/lib -R/Tools/SunOS_5.11_i86pc_amd64/isl-0.12.2/lib -R/Tools/SunOS_5.11_i86pc_amd64/cloog-0.18.1/lib' Bootstrap command: gmake BOOT_LDFLAGS='-R/Tools/SunOS_5.11_i86pc_amd64/gmp-6.0.0a/lib -R/Tools/SunOS_5.11_i86pc_amd64/mpfr-3.1.2/lib -R/Tools/SunOS_5.11_i86pc_amd64/mpc-1.0.2/lib -R/Tools/SunOS_5.11_i86pc_amd64/isl-0.12.2/lib -R/Tools/SunOS_5.11_i86pc_amd64/cloog-0.18.1/lib' BUILD_CONFIG=bootstrap-lto profiledbootstrap Failing command: /export/data/build/gcc-4.9.2-obj/./prev-gcc/xgcc -B/export/data/build/gcc-4.9.2-obj/./prev-gcc/ -B/Tools/SunOS_5.11_i86pc_amd64/gcc-4.9.2-allgnu/x86_64-pc-solaris2.11/bin/ -B/Tools/SunOS_5.11_i86pc_amd64/gcc-4.9.2-allgnu/x86_64-pc-solaris2.11/bin/ -B/Tools/SunOS_5.11_i86pc_amd64/gcc-4.9.2-allgnu/x86_64-pc-solaris2.11/lib/ -isystem /Tools/SunOS_5.11_i86pc_amd64/gcc-4.9.2-allgnu/x86_64-pc-solaris2.11/include -isystem /Tools/SunOS_5.11_i86pc_amd64/gcc-4.9.2-allgnu/x86_64-pc-solaris2.11/sys-include -c -DHAVE_CONFIG_H -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -fprofile-use -I. -I../../gcc-4.9.2/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../gcc-4.9.2/libiberty/regex.c -o regex.o ../../gcc-4.9.2/libiberty/regex.c: In function 'byte_re_match_2_internal': ../../gcc-4.9.2/libiberty/regex.c:8128:1: internal compiler error: in streamer_write_gcov_count_stream, at data-streamer-out.c:303 } ^ 0x136348a streamer_write_gcov_count_stream ../../gcc-4.9.2/gcc/data-streamer-out.c:303 0x136348a streamer_write_gcov_count(output_block*, long) ../../gcc-4.9.2/gcc/data-streamer-out.c:188 0xf4270d stream_out_histogram_value(output_block*, histogram_value_t*) ../../gcc-4.9.2/gcc/value-prof.c:388 0x138c4c4 output_gimple_stmt ../../gcc-4.9.2/gcc/gimple-streamer-out.c:185 0x138c4c4 output_bb(output_block*, basic_block_def*, function*) ../../gcc-4.9.2/gcc/gimple-streamer-out.c:215 0xa99095 output_function ../../gcc-4.9.2/gcc/lto-streamer-out.c:1892 0xa99095 lto_output() ../../gcc-4.9.2/gcc/lto-streamer-out.c:2084 0xaf5b07 write_lto ../../gcc-4.9.2/gcc/passes.c:2298 0xaf806f ipa_write_summaries_1 ../../gcc-4.9.2/gcc/passes.c:2360 0xaf806f ipa_write_summaries() ../../gcc-4.9.2/gcc/passes.c:2417 0x769323 ipa_passes ../../gcc-4.9.2/gcc/cgraphunit.c:2078 0x769323 compile() ../../gcc-4.9.2/gcc/cgraphunit.c:2174 0x76b3ac finalize_compilation_unit() ../../gcc-4.9.2/gcc/cgraphunit.c:2329 0x5a4bc3 c_write_global_declarations() ../../gcc-4.9.2/gcc/c/c-decl.c:10401 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.