2004-05-31 H.J. Lu * cgraph.c (cgraph_remove_node): Don't call htab_clear_slot if we can't find the slot. Abort if we can't find slot and the node isn't for a builtin function. --- gcc/cgraph.c.cgraph 2004-02-23 13:24:04.000000000 -0800 +++ gcc/cgraph.c 2004-05-31 13:55:48.027615000 -0700 @@ -242,7 +242,16 @@ cgraph_remove_node (struct cgraph_node * htab_find_slot_with_hash (cgraph_hash, DECL_ASSEMBLER_NAME (node->decl), IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME (node->decl)), NO_INSERT); - htab_clear_slot (cgraph_hash, slot); + if (slot == 0) + { + /* We use DECL_ASSEMBLER_NAME as key, which may not work in + all cases. See PR/15666. Gcc 3.5 uses DECL_UID as key, + which doesn't have this problem. */ + if (!DECL_BUILT_IN (node->decl)) + abort (); + } + else + htab_clear_slot (cgraph_hash, slot); /* Do not free the structure itself so the walk over chain can continue. */ }