From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 085643838000; Thu, 6 May 2021 21:19:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 085643838000 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/100463] many errors using GTY and hash_map Date: Thu, 06 May 2021 21:19:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2021 21:19:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100463 --- Comment #3 from Martin Sebor --- 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 =E2=80=98static void= hash_map< , , >::hash_entry::pch_nx(hash_map< , , >::hash_entry&) [with Ke= yId =3D int_hash; Value =3D int; Traits =3D simple_hashmap_traits >, int>]=E2=80=99: /ssd/src/gcc/trunk/gcc/hash-table.h:1198:17: required from =E2=80=98void gt_pch_nx(hash_table*) [with D =3D hash_map, int>::hash_entry]=E2=80=99 /ssd/src/gcc/trunk/gcc/hash-map.h:319:13: required from =E2=80=98void gt_pch_nx(hash_map*) [with K =3D int_hash; V =3D int; H =3D simple_hashmap_traits >, int>]=E2=80=99 ./gt-except.h:97:19: required from here /ssd/src/gcc/trunk/gcc/hash-map.h:87:12: error: call of overloaded =E2=80=98gt_pch_nx(hash_map, int= >::Key&)=E2=80=99 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: =E2=80=98void gt_pch_n= x(int)=E2=80=99 gt_pch_nx (int) ^~~~~~~~~ /ssd/src/gcc/trunk/gcc/ggc.h:346:1: note: candidate: =E2=80=98void gt_pch_n= x(unsigned int)=E2=80=99 gt_pch_nx (unsigned int) ^~~~~~~~~=