public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-103769-4-Gh1f89VQ0a@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103769-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103769 --- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> --- 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 = arglist; elt.spec = NULL_TREE; hash = spec_hasher::hash (&elt); + debug_tree (arglist); + fprintf (stderr, "hashing %p, %p: %d\n", arglist, gen_tmpl, hash); + entry = type_specializations->find_with_hash (&elt, hash); if (entry) I see: ./xg++ -B. --param=hash-table-verification-limit=10000 -O1 ~/Programming/testcases/pr103769.C -c <tree_vec 0x7ffff77059e0 length:1 elt:0 <template_type_parm 0x7ffff770e348 Args VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff770ed20 index 0 level 1 orig_level 1 chain <type_decl 0x7ffff75d4ab0 Args>>> hashing 0x7ffff77059e0, 0x7ffff7722000: -913564281 <tree_vec 0x7ffff7705b00 length:1 elt:0 <type_argument_pack 0x7ffff770e5e8 type <tree_vec 0x7ffff7705b20 length:1 elt:0 <type_pack_expansion 0x7ffff770e540>> VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff770e5e8>> hashing 0x7ffff7705b00, 0x7ffff7722080: -1965388615 <tree_vec 0x7ffff7705ce0 length:1 elt:0 <type_argument_pack 0x7ffff77280a8 type <tree_vec 0x7ffff7705d00 length:1 elt:0 <type_pack_expansion 0x7ffff770e498>> 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 = { tmpl = <template_decl 0x7ffff7722080 s>, args = <tree_vec 0x7ffff7705b00>, spec = <record_type 0x7ffff770e690 s> } (gdb) p *comparable $3 = { tmpl = <template_decl 0x7ffff7722080 s>, args = <tree_vec 0x7ffff7705ce0>, spec = <tree 0x0> } 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.
next prev parent reply other threads:[~2022-01-07 9:27 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-19 16:39 [Bug c++/103769] New: ICE in hashtab_chk_error alias template and pack expansion ppalka at gcc dot gnu.org 2021-12-19 16:42 ` [Bug c++/103769] [11/12 Regression] checking ICE in hashtab_chk_error with alias template and pack expansion after r11-7931 ppalka at gcc dot gnu.org 2021-12-30 16:13 ` pinskia at gcc dot gnu.org 2021-12-30 16:18 ` pinskia at gcc dot gnu.org 2022-01-01 4:19 ` pinskia at gcc dot gnu.org 2022-01-07 8:05 ` slyfox at gcc dot gnu.org 2022-01-07 9:09 ` slyfox at gcc dot gnu.org 2022-01-07 9:27 ` marxin at gcc dot gnu.org [this message] 2022-01-08 20:02 ` slyfox at gcc dot gnu.org 2022-01-17 12:37 ` rguenth at gcc dot gnu.org 2022-03-23 14:10 ` jason at gcc dot gnu.org 2022-03-28 13:37 ` cvs-commit at gcc dot gnu.org 2022-03-28 19:13 ` [Bug c++/103769] [11 " cvs-commit at gcc dot gnu.org 2022-03-28 19:14 ` jason at gcc dot gnu.org 2022-03-29 19:02 ` alexander.lelyakin at googlemail dot com 2022-11-30 5:27 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103769-4-Gh1f89VQ0a@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).