touch a.c gcc -fPIC -fwhopr -O2 -c a.c gcc -shared -fPIC a.o -fwhopr -O2 -o liba.so
leads to: lto1: internal compiler error: vector VEC(cgraph_node_ptr,base) index domain error, in csi_node at cgraph.h:663 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: gcc returned 1 exit status collect2: lto-wrapper returned 1 exit status Doesn't happen with -flto instead of -fwhopr at link time, or with neither flag. This ICE fails several tests in the Libtool testsuite, with several different (valid) source files. I'm guessing the actual source file contents are irrelevant for the bug. If the -fwhopr flag was not meant to be passed at shared library creation time, then this would be a documentation bug and an ice-on-invalid-code instead. -- Summary: LTO -fwhopr generating shared library: ICE in csi_node at cgraph.h:663 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, lto Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rwild at gcc dot gnu dot org GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43609