https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254
Bug ID: 69254 Summary: internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: sasha.levin at oracle dot com Target Milestone: --- Hi, I've tried to build the linux kernel with lto (CONFIG_LTO=y), but it seems to fail with the following: + exec gcc -nostdlib -flto=128 -flto -fno-toplevel-reorder -fno-fat-lto-objects -fwhole-program -fipa-cp-clone -g -gdwarf-4 -O2 -fno-strict-aliasing -fno-common -falign-jumps=1 -falign-loops=1 -funit-at-a-time -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -fno-inline-functions-called-once -fno-strict-overflow -fconserve-stack -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel -maccumulate-outgoing-args -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wframe-larger-than=2048 -Wno-unused-but-set-variable -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Wl,-m,elf_x86_64 -Wl,--emit-relocs -Wl,--build-id -Wl,-X -o .tmp_vmlinux1 -Wl,-T,./arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/head.o init/built-in.o -Wl,--start-group usr/built-in.o arch/x86/built-in.o kernel/built-in.o certs/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/x86/lib/lib.a lib/built-in.o arch/x86/lib/built-in.o drivers/built-in.o sound/built-in.o firmware/built-in.o arch/x86/pci/built-in.o arch/x86/oprofile/built-in.o arch/x86/power/built-in.o arch/x86/video/built-in.o arch/x86/ras/built-in.o net/built-in.o virt/built-in.o -Wl,--end-group lto1: internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144 0xc14842 streamer_get_builtin_tree(lto_input_block*, data_in*) ../../gcc/tree-streamer-in.c:1144 0x8c51c4 lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int) ../../gcc/lto-streamer-in.c:1419 0x8c53a9 lto_input_scc(lto_input_block*, data_in*, unsigned int*, unsigned int*) ../../gcc/lto-streamer-in.c:1347 0x5ce316 lto_read_decls ../../gcc/lto/lto.c:1698 0x5d0f1d lto_file_finalize ../../gcc/lto/lto.c:2043 0x5d0f1d lto_create_files_from_ids ../../gcc/lto/lto.c:2053 0x5d0f1d lto_file_read ../../gcc/lto/lto.c:2094 0x5d0f1d read_cgraph_and_symbols ../../gcc/lto/lto.c:2804 0x5d0f1d lto_main() ../../gcc/lto/lto.c:3304 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. lto-wrapper: fatal error: gcc returned 1 exit status compilation terminated. My gcc version is at trunk: $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/sasha/gcc-inst/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native --with-tune=native --enable-languages=c --enable-lto --enable-gold --enable-stage1-languages=c Thread model: posix gcc version 6.0.0 20160112 (experimental) (GCC)