2004-05-29 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.builtin 2004-02-23 13:24:04.000000000 -0800 +++ gcc/cgraph.c 2004-05-29 23:13:12.748997245 -0700 @@ -242,7 +242,26 @@ 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) + { + if (!DECL_BUILT_IN (node->decl)) + /* We use DECL_ASSEMBLER_NAME as key, which doesn't work with + + extern __inline int + foo (const char *__s, char __reject) + { + return __builtin_strchr (__s, __reject) != ((void *)0); + } + + extern char *bar (__const char *__s, int __c); + extern __typeof (bar) strchr __asm__ ("bar"); + + Gcc 3.5 uses DECL_UID as key. which doesn't have this + problem. */ + abort (); + } + else + htab_clear_slot (cgraph_hash, slot); /* Do not free the structure itself so the walk over chain can continue. */ }