https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100463
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- As it turns out, the hash_map primary template is incomplete. Defining the following member fixes that error only to expose another: index 0779c930f0a..c07bd04704f 100644 --- a/gcc/hash-map.h +++ b/gcc/hash-map.h @@ -114,6 +114,11 @@ class GTY((user)) hash_map static void pch_nx_helper (unsigned int, gt_pointer_operator, void *) + { + } + + static void + pch_nx_helper (long int, gt_pointer_operator, void *) { } In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595, from /ssd/src/gcc/trunk/gcc/coretypes.h:480, from /ssd/src/gcc/trunk/gcc/except.c:114: /ssd/src/gcc/trunk/gcc/hash-map.h: In instantiation of ‘static void hash_map< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3> >::hash_entry::pch_nx(hash_map< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3> >::hash_entry&) [with KeyId = int_hash<long int, 0, 9223372036854775807>; Value = int; Traits = simple_hashmap_traits<default_hash_traits<int_hash<long int, 0, 9223372036854775807> >, int>]’: /ssd/src/gcc/trunk/gcc/hash-table.h:1198:17: required from ‘void gt_pch_nx(hash_table<E>*) [with D = hash_map<int_hash<long int, 0, 9223372036854775807>, int>::hash_entry]’ /ssd/src/gcc/trunk/gcc/hash-map.h:319:13: required from ‘void gt_pch_nx(hash_map<K, V, H>*) [with K = int_hash<long int, 0, 9223372036854775807>; V = int; H = simple_hashmap_traits<default_hash_traits<int_hash<long int, 0, 9223372036854775807> >, int>]’ ./gt-except.h:97:19: required from here /ssd/src/gcc/trunk/gcc/hash-map.h:87:12: error: call of overloaded ‘gt_pch_nx(hash_map<int_hash<long int, 0, 9223372036854775807>, int>::Key&)’ is ambiguous gt_pch_nx (e.m_key); ~~~~~~~~~~^~~~~~~~~ In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:247, from /ssd/src/gcc/trunk/gcc/coretypes.h:480, from /ssd/src/gcc/trunk/gcc/except.c:114: /ssd/src/gcc/trunk/gcc/ggc.h:341:1: note: candidate: ‘void gt_pch_nx(int)’ gt_pch_nx (int) ^~~~~~~~~ /ssd/src/gcc/trunk/gcc/ggc.h:346:1: note: candidate: ‘void gt_pch_nx(unsigned int)’ gt_pch_nx (unsigned int) ^~~~~~~~~