With gcc trunk revision 162816 I am unable to compile Firefox with WHOPR (or LTO, for that matter) because I get the following ICE: lto1: internal compiler error: in lto_varpool_replace_node, at lto-symtab.c:292 I will attach preprocessed versions of four source files which are necessary to reproduce the issue.
Created attachment 21401 [details] Original testcase After extracting, set CC and CXX variables to paths to c and c++ compilers respectively and run the run script: $ CXX=/abuild/mjambor/inst/icln/bin/g++ CC=/abuild/mjambor/inst/icln/bin/gcc ./run + /abuild/mjambor/inst/icln/bin/gcc -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c sysunix.i + /abuild/mjambor/inst/icln/bin/gcc -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c editline.i + /abuild/mjambor/inst/icln/bin/g++ -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c -fno-rtti -fpermissive -Wno-invalid-offsetof js.ii + /abuild/mjambor/inst/icln/bin/g++ -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c -fno-rtti -fpermissive -Wno-invalid-offsetof jsworkers.ii + /abuild/mjambor/inst/icln/bin/g++ -o js -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer js.o jsworkers.o editline.o sysunix.o -lpthread -Wl,-rpath-link,/bin -Wl,-rpath-link,/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm lto1: internal compiler error: in lto_varpool_replace_node, at lto-symtab.c:292 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: /abuild/mjambor/inst/icln/bin/g++ returned 1 exit status /usr/bin/gold: fatal error: lto-wrapper failed collect2: ld returned 1 exit status
It works for me on clean tree at today mainline. + ../xgcc -B .. -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c sysunix.i + ../xgcc -B .. -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c editline.i + ../g++ -B .. -L ../../x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/ -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c -fno-rtti -fpermissive -Wno-invalid-offsetof js.ii + ../g++ -B .. -L ../../x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/ -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer -c -fno-rtti -fpermissive -Wno-invalid-offsetof jsworkers.ii + ../g++ -B .. -L ../../x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/ -o js -fPIC -fno-exceptions -fwhopr=24 -fuse-linker-plugin -fno-strict-aliasing -pthread -pipe -Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer js.o jsworkers.o editline.o sysunix.o -lpthread -Wl,-rpath-link,/bin -Wl,-rpath-link,/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: /tmp/ccqrfzic.ltrans0.ltrans.o: in function _ZL18split_getObjectOpsP9JSContextP7JSClass.5202.4730:ccqrfzic.ltrans0.o(.text+0x2f): error: undefined reference to 'js_ObjectOps' /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: /tmp/ccqrfzic.ltrans0.ltrans.o: in function _ZL22ShellOperationCallbackP9JSContext.4851.5014:ccqrfzic.ltrans0.o(.text+0xb1): error: undefined reference to 'JS_ClearPendingException' /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: /tmp/ccqrfzic.ltrans0.ltrans.o: in function _ZN8ToStringC2EP9JSContextli.local.285.constprop.348.3463:ccqrfzic.ltrans0.o(.text+0xd4): error: undefined reference to 'JS_ValueToString' .... Can you double check if it works for you too? Might be also gold bug. Mine is: jh@evans:/abuild/jh/trunk-2/gcc> gold --version GNU gold (GNU Binutils; SUSE Linux Enterprise 11 2.20.0.20100122-0.7.9) 1.9 Copyright 2008 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty.
No, I still get the same ICE (on both the reduced testcase and firefox as such) even with a recent checkout of trunk (revision 163677 from yesterday). Not only I use the same version of gold but apparently also the same binary on the same computer :-) How do you configure the gcc? I use /abuild/mjambor/icln/configure --prefix=/abuild/mjambor/inst/icln/ --enable-checking=yes --enable-languages=c,c++ --disable-bootstrap --enable-gold --with-plugin-ld=/usr/bin/gold
Hmm, so actually it is really difference in gold. System gold on evans is GNU gold (GNU Binutils; SUSE Linux Enterprise 11 2.20.0.20100122-0.7.9) 1. while one I use is GNU gold (GNU Binutils 2.20.51.20100706) 1.9 you might just grab gold binary from /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ Sorry, I remembered I installed gold, but I tought it is long gone ;) Honza