--- gcc/objc/hash.c 2018/04/24 18:26:42 1.1.1.4 +++ gcc/objc/hash.c 2018/04/24 18:33:08 1.1.1.5 @@ -243,9 +243,10 @@ hash_value_for_key (cache_ptr cache, con if (node) do { - if ((*cache->compare_func)(node->key, key)) + if ((*cache->compare_func)(node->key, key)) { retval = node->value; - else + break; + } else node = node->next; } while (!retval && node);