From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 055AD3858013; Fri, 7 Jan 2022 09:27:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 055AD3858013 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103769] [11/12 Regression] checking ICE in hashtab_chk_error with alias template and pack expansion after r11-7931 Date: Fri, 07 Jan 2022 09:27:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 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: Fri, 07 Jan 2022 09:27:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103769 --- Comment #7 from Martin Li=C5=A1ka --- With: diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 0fa4a162354..9a8bfa51049 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see #include "gcc-rich-location.h" #include "selftest.h" #include "target.h" +#include "print-tree.h" /* The type of functions taking a tree, and some additional data, and returning an int. */ @@ -9902,6 +9903,9 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context, elt.args =3D arglist; elt.spec =3D NULL_TREE; hash =3D spec_hasher::hash (&elt); + debug_tree (arglist); + fprintf (stderr, "hashing %p, %p: %d\n", arglist, gen_tmpl, hash); + entry =3D type_specializations->find_with_hash (&elt, hash); if (entry) I see: ./xg++ -B. --param=3Dhash-table-verification-limit=3D10000 -O1 ~/Programming/testcases/pr103769.C -c >> hashing 0x7ffff77059e0, 0x7ffff7722000: -913564281 > VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff770e5e8>> hashing 0x7ffff7705b00, 0x7ffff7722080: -1965388615 > VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff77280a8>> hashing 0x7ffff7705ce0, 0x7ffff7722080: 683150001 verification fails for: (gdb) p **entry $2 =3D { tmpl =3D , args =3D , spec =3D } (gdb) p *comparable $3 =3D { tmpl =3D , args =3D , spec =3D } So as seen, comp_template_args (e1->args, e2->args)) return true, while the hash values are different at the place where I dump them.=