> ./g++ -B. -B ../x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -O -flto -fwhole-program auto_derivative_function.3.ii lto1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. for template <int dim> struct AutoDerivativeFunction { virtual void gradient_list (void); }; template <int dim> void AutoDerivativeFunction<dim>::gradient_list (void) { } template class AutoDerivativeFunction<1>; int main() {} The ICE happens in IPA pure-const: Program received signal SIGSEGV, Segmentation fault. 0x0000000000b91ebb in propagate () at /space/rguenther/src/svn/trunk/gcc/ipa-pure-const.c:876 876 if (pure_const_state < w_l->pure_const_state) (gdb) p w_l $1 = (funct_state) 0x0 (gdb) bt #0 0x0000000000b91ebb in propagate () at /space/rguenther/src/svn/trunk/gcc/ipa-pure-const.c:876 #1 0x00000000007d5dbd in execute_one_pass (pass=0x14b08c0) at /space/rguenther/src/svn/trunk/gcc/passes.c:1519 The ICE goes away when dropping either -flto or -fwhole-program.
This breaks 447.dealII build currently.
Subject: Re: New: ICE with -flto -fwhole-program The problem here is that ipa-pure-const skips analysis of overwrittable nodes. But with LTO and whole program the nodes might look overwrittable at compile time, but at link time we want to use their analysis. Additionally we assume that function without bodies are opaque that is not true too, so in fact we are limitting the pass to single file only. Same problem is with the other ipa-* passes, I am testing patch for this pass and looking into others. Honza
Subject: Bug 41730 Author: rguenth Date: Thu Oct 22 13:10:55 2009 New Revision: 153455 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153455 Log: 2009-10-22 Richard Guenther <rguenther@suse.de> PR lto/41730 * g++.dg/lto/20091022-1_0.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/lto/20091022-1_0.C Modified: trunk/gcc/testsuite/ChangeLog
Fixed.
Subject: Bug 41730 Author: hubicka Date: Thu Oct 22 13:31:48 2009 New Revision: 153456 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153456 Log: * ipa-cp.c (ipcp_read_summary): Remove now invalid FIXME and flag_ltrans check. * ipa-inline.c (cgraph_mark_inline_edge, cgraph_decide_inlining_of_small_function, cgraph_decide_inlining, inline_read_summary): Disable indirect inlining for WPA for time being. PR tree-optimize/40556 * ipa-inline.c (cgraph_early_inlining): Fix iterations condition. Fix PR number for earlier patch to: PR lto/41730 Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-cp.c trunk/gcc/ipa-inline.c