https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109531
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-04-17 Status|UNCONFIRMED |NEW --- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> --- > is the more correct way of reducing it similar to my script :). Sure, this is better not to rely on specific options. Anyway, reduced to: $ cat ArithmeticSubtermGeneralization.ii template <class> using no_ref_t = int *; template <class Arr, template <class> class ref_t> struct ArrayishObjectIterator { typedef ref_t<typename Arr::_ElementType> _ElementType; }; struct MappingIterator { typedef int *_ElementType; }; template <class Iter> struct IterTraits { IterTraits<MappingIterator> map() {} template <template <class> class Container> Container<typename Iter::_ElementType> collect(); }; struct Clause { typedef int _ElementType; }; IterTraits<ArrayishObjectIterator<Clause, no_ref_t>> __trans_tmp_3; $ g++ ArithmeticSubtermGeneralization.ii -c -w hash table checking failed: equal operator returns true for a pair of values with a different hash value ArithmeticSubtermGeneralization.ii: In instantiation of ‘struct IterTraits<ArrayishObjectIterator<Clause, no_ref_t> >’: ArithmeticSubtermGeneralization.ii:17:54: required from here ArithmeticSubtermGeneralization.ii:12:42: internal compiler error: in hashtab_chk_error, at hash-table.cc:137 12 | Container<typename Iter::_ElementType> collect(); | ^~~~~~~ 0x92d1bd hashtab_chk_error() /home/marxin/Programming/gcc/gcc/hash-table.cc:137 0xb668b2 hash_table<ctp_hasher, false, xcallocator>::verify(tree_node* const&, unsigned int) /home/marxin/Programming/gcc/gcc/hash-table.h:1118 0xb668b2 hash_table<ctp_hasher, false, xcallocator>::find_slot_with_hash(tree_node* const&, unsigned int, insert_option) /home/marxin/Programming/gcc/gcc/hash-table.h:1046 0xb1ede9 hash_table<ctp_hasher, false, xcallocator>::find_slot(tree_node* const&, insert_option) /home/marxin/Programming/gcc/gcc/hash-table.h:435 0xb1ede9 canonical_type_parameter(tree_node*) /home/marxin/Programming/gcc/gcc/cp/pt.cc:4536 0xb2e141 tsubst(tree_node*, tree_node*, int, tree_node*) /home/marxin/Programming/gcc/gcc/cp/pt.cc:16298 0xb33018 tsubst_function_type /home/marxin/Programming/gcc/gcc/cp/pt.cc:15649 0xb2cb3b tsubst(tree_node*, tree_node*, int, tree_node*) /home/marxin/Programming/gcc/gcc/cp/pt.cc:16468 0xb4e3b9 tsubst_function_decl /home/marxin/Programming/gcc/gcc/cp/pt.cc:14419 0xb51060 tsubst_template_decl /home/marxin/Programming/gcc/gcc/cp/pt.cc:14730 0xb2faba tsubst_decl /home/marxin/Programming/gcc/gcc/cp/pt.cc:14892 0xb5e566 instantiate_class_template(tree_node*) /home/marxin/Programming/gcc/gcc/cp/pt.cc:12338 0xbb0be8 complete_type(tree_node*) /home/marxin/Programming/gcc/gcc/cp/typeck.cc:138 0x9d5494 start_decl_1(tree_node*, bool) /home/marxin/Programming/gcc/gcc/cp/decl.cc:6002 0x9d5494 start_decl_1(tree_node*, bool) /home/marxin/Programming/gcc/gcc/cp/decl.cc:5981 0x9f5507 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) /home/marxin/Programming/gcc/gcc/cp/decl.cc:5968 0xaf8431 cp_parser_init_declarator /home/marxin/Programming/gcc/gcc/cp/parser.cc:22910 0xacf278 cp_parser_simple_declaration /home/marxin/Programming/gcc/gcc/cp/parser.cc:15403 0xb03bf3 cp_parser_declaration /home/marxin/Programming/gcc/gcc/cp/parser.cc:15089 0xb0473a cp_parser_toplevel_declaration /home/marxin/Programming/gcc/gcc/cp/parser.cc:15110 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.