http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346
Diego Novillo <dnovillo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #3 from Diego Novillo <dnovillo at gcc dot gnu.org> 2011-11-30 20:17:08 UTC --- The reason we get into this ICE is because the call to cgraph_edge() has the side effect of adding entries to e->caller->call_site_hash: if (n > 100) { node->call_site_hash = htab_create_ggc (120, edge_hash, edge_eq, NULL); for (e2 = node->callees; e2; e2 = e2->next_callee) cgraph_add_edge_to_call_site_hash (e2); for (e2 = node->indirect_calls; e2; e2 = e2->next_callee) cgraph_add_edge_to_call_site_hash (e2); } When cgraph_edge is called with n > 100, the call to cgraph_add_edge_to_call_site_hash asserts because e->call_stmt is already in the hash table. Honza, why is this a problem? The code is expecting to find the slot empty, but I'm not sure why it expects that. Any pointers? Thanks. Diego.