------- Comment #1 from kargl at gcc dot gnu dot org 2010-04-22 21:08 ------- It in fact appears that -fresolution is not handled properly.
/home/sgk/work/4x/bin/gcc -flto -fresolution -o z h.o m.o resolution_file_name = h.o where I instrumented lto.c to see if resolution_file_name = -o note h.o isn't in the expected format and triggers the ICE. In lto.c, these lines should probably be changed to a fatal_error. troutmask:sgk[274] /home/sgk/work/4x/bin/gcc -flto -fresolution h.o m.o lto1: fatal error: symbol resolution file h.o appears mangled compilation terminated. Index: lto/lto.c =================================================================== --- lto/lto.c (revision 158649) +++ lto/lto.c (working copy) @@ -1794,7 +1794,9 @@ read_cgraph_and_symbols (unsigned nfiles xstrerror (errno)); t = fscanf (resolution, "%u", &num_objects); - gcc_assert (t == 1); + if (t != 1) + fatal_error ("symbol resolution file %s appears mangled", + resolution_file_name); /* True, since the plugin splits the archives. */ gcc_assert (num_objects == nfiles); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43857