From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B501F3858430; Fri, 7 Jan 2022 08:05:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B501F3858430 From: "slyfox 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 08:05:33 +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: slyfox 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 08:05:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103769 --- Comment #5 from Sergei Trofimovich --- I think I found something similar on openttd-12.1. Seems to be a mostly gcc= -12 regression: $ cat bug.cpp template using t =3D T; template struct s; template s...> f() { f(); } $ g++-12.0.0 --param=3Dhash-table-verification-limit=3D1000 -O1 -o a.o -c b= ug.cpp hash table checking failed: equal operator returns true for a pair of values with a different hash value bug.cpp: In substitution of 'template s f() [with Args =3D {void}]': bug.cpp:3:56: required from here bug.cpp:3:43: internal compiler error: in hashtab_chk_error, at hash-table.c:137 3 | template s...> f() { f(); } | ^ 0x9c316d hashtab_chk_error() ../../gcc-12-20220102/gcc/hash-table.c:137 0xbeca15 hash_table::verify(spec_entry* const&, unsigned int) ../../gcc-12-20220102/gcc/hash-table.h:1036 0xbecb6f hash_table::find_with_hash(spec_entry* const&, unsigned int) ../../gcc-12-20220102/gcc/hash-table.h:921 0xbd58bc lookup_template_class_1 ../../gcc-12-20220102/gcc/cp/pt.c:9905 0xbd7e06 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_nod= e*, int, int) ../../gcc-12-20220102/gcc/cp/pt.c:10260 0xbd7e06 tsubst_aggr_type ../../gcc-12-20220102/gcc/cp/pt.c:13642 0xbcdf6a tsubst_function_type ../../gcc-12-20220102/gcc/cp/pt.c:15154 0xbbffcd tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc-12-20220102/gcc/cp/pt.c:15970 0xbe40f9 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bo= ol, bool) ../../gcc-12-20220102/gcc/cp/pt.c:21857 0x9e1529 add_template_candidate_real ../../gcc-12-20220102/gcc/cp/call.c:3544 0x9e2473 add_template_candidate ../../gcc-12-20220102/gcc/cp/call.c:3632 0x9e2473 add_candidates ../../gcc-12-20220102/gcc/cp/call.c:6165 0x9e8849 add_candidates ../../gcc-12-20220102/gcc/cp/call.c:4692 0x9e8849 perform_overload_resolution ../../gcc-12-20220102/gcc/cp/call.c:4709 0x9ed682 build_new_function_call(tree_node*, vec**, int) ../../gcc-12-20220102/gcc/cp/call.c:4816 0xc03d31 finish_call_expr(tree_node*, vec**, b= ool, bool, int) ../../gcc-12-20220102/gcc/cp/semantics.c:2865 0xb64f91 cp_parser_postfix_expression ../../gcc-12-20220102/gcc/cp/parser.c:7821 0xb4d49a cp_parser_binary_expression ../../gcc-12-20220102/gcc/cp/parser.c:9984 0xb4dfbe cp_parser_assignment_expression ../../gcc-12-20220102/gcc/cp/parser.c:10288 0xb4fae9 cp_parser_expression ../../gcc-12-20220102/gcc/cp/parser.c:10458 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $ g++-12.0.0 -v Using built-in specs. COLLECT_GCC=3D/nix/store/9s988q1yj67hk7d2v7wxl961h2d34mgg-gcc-debug-12.0.0/= bin/g++ COLLECT_LTO_WRAPPER=3D/nix/store/9s988q1yj67hk7d2v7wxl961h2d34mgg-gcc-debug= -12.0.0/libexec/gcc/x86_64-unknown-linux-gnu/12.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20220102 (experimental) (GCC)=