http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55792
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2013-01-04 23:57:55 UTC --- Created attachment 29085 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29085 A patch to move lto_global_var_decls to lto/lto.c With this patch, I got lto1: internal compiler error: Segmentation fault 0x997fc5 crash_signal /export/gnu/import/git/gcc/gcc/toplev.c:334 0x545095 ggc_get_size(void const*) /export/gnu/import/git/gcc/gcc/ggc-page.c:1531 0x7453cf ggc_realloc_stat(void*, unsigned long) /export/gnu/import/git/gcc/gcc/ggc-common.c:199 0x52b01a void va_gc::reserve<tree_node*, va_gc>(vec<tree_node*, va_gc, vl_embed>*&, unsigned int, bool) /export/gnu/import/git/gcc/gcc/vec.h:379 0x52ae82 bool vec_safe_reserve<tree_node*, va_gc>(vec<tree_node*, va_gc, vl_embed>*&, unsigned int, bool) /export/gnu/import/git/gcc/gcc/vec.h:657 0x53c953 tree_node** vec_safe_push<tree_node*, va_gc>(vec<tree_node*, va_gc, vl_embed>*&, tree_node* const&) /export/gnu/import/git/gcc/gcc/vec.h:749 0x53bee2 lto_main() /export/gnu/import/git/gcc/gcc/lto/lto.c:3407 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. make[5]: *** [/tmp/cci2rOkJ.ltrans0.ltrans.o] Error 1 lto-wrapper: make returned 2 exit status /usr/local/x86_64-unknown-linux-gnu/bin/ld: lto-wrapper failed collect2: error: ld returned 1 exit status make[4]: *** [build/genhooks] Error 1 make[4]: *** Waiting for unfinished jobs.... rm cpp.pod gfdl.pod gcov.pod gfortran.pod gcc.pod fsf-funding.pod make[4]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux/gcc' make[3]: *** [all-stage2-gcc] Error 2 make[3]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux' make[2]: *** [stage2-bubble] Error 2 make[2]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux' make[1]: *** [bootstrap] Error 2 make[1]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux'