https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92476
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|hubicka at gcc dot gnu.org |mjambor at suse dot cz --- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Martin, this problem is caused by ipa-cp deciding to clone function which has thunk associated to it. create_virtual_clone then copies thunk (which is your code) and and expands all thunks. This turn thunk into real function and because ipa-cp does not produce summaries for thunks we now ICE because summary is missing. I tried the following to compute the missing summary: Index: cgraphclones.c =================================================================== --- cgraphclones.c (revision 278390) +++ cgraphclones.c (working copy) @@ -80,6 +80,11 @@ along with GCC; see the file COPYING3. #include "tree-inline.h" #include "dumpfile.h" #include "gimple-pretty-print.h" +#include "alloc-pool.h" +#include "symbol-summary.h" +#include "tree-vrp.h" +#include "ipa-prop.h" +#include "ipa-fnsummary.h" /* Create clone of edge in the node N represented by CALL_EXPR the callgraph. */ @@ -268,6 +273,8 @@ cgraph_node::expand_all_artificial_thunk thunk->thunk.thunk_p = false; thunk->analyze (); } + ipa_analyze_node (thunk); + inline_analyze_function (thunk); thunk->expand_all_artificial_thunks (); } else but that moves the ICE later: hubicka@lomikamen-jh:/aux/hubicka/trunk5/build-lto/gcc$ ./xgcc -B ./ -O2 a.C -m32 during IPA pass: cp a.C:40:1: internal compiler error: in ipa_get_parm_lattices, at ipa-cp.c:388 40 | } | ^ 0x234db7d ipa_get_parm_lattices ../../gcc/ipa-cp.c:388 0x23595b1 ipcp_store_bits_results ../../gcc/ipa-cp.c:5417 0x2359c7a ipcp_driver ../../gcc/ipa-cp.c:5558 0x2359e58 execute ../../gcc/ipa-cp.c:5647 Please submit a full bug report, which is caued by fact that we have no lattices for that function (since it was not considered by the propagator). I also wonder why these seems to show with 32bit only. Honza