https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93907

            Bug ID: 93907
           Summary: internal compiler error: in hashtab_chk_error, at
                    hash-table.c:137
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

The attached code crashes when compiled with -std=gnu++2a. THe error looks like
it might be related to PR 87847:

hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_iterator_base_types.h:71,
                 from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:65,
                 from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/algorithm:61,
                 from
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc:20:
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/iterator_concepts.h:
In instantiation of ‘std::ranges::borrowed_iterator_t<_Range>
std::ranges::__uninitialized_fill_fn::operator()(_Range&&, const _Tp&) const
[with _Range = __gnu_test::test_range<X,
__gnu_test::forward_iterator_wrapper>&; _Tp = int;
std::ranges::borrowed_iterator_t<_Range> =
__gnu_test::forward_iterator_wrapper<X>]’:
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc:112:38:
  required from here
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/iterator_concepts.h:512:11:
internal compiler error: in hashtab_chk_error, at hash-table.c:137
  512 |  requires __detail::__is_signed_integer_like<iter_difference_t<_Iter>>;
      |  ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x8ec2c6 hashtab_chk_error()
        /home/jwakely/src/gcc/gcc/gcc/hash-table.c:137
0x94f213 hash_table<sat_hasher, false, xcallocator>::verify(sat_entry* const&,
unsigned int)
        /home/jwakely/src/gcc/gcc/gcc/hash-table.h:1033
0x94f387 hash_table<sat_hasher, false, xcallocator>::find_with_hash(sat_entry*
const&, unsigned int)
        /home/jwakely/src/gcc/gcc/gcc/hash-table.h:934
0x94be62 satisfy_atom
        /home/jwakely/src/gcc/gcc/gcc/hash-table.h:430
0x94be62 satisfy_constraint_r
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2579
0x94becb satisfy_conjunction
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2383
0x94becb satisfy_constraint_r
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2575
0x94bd42 satisfy_disjunction
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2400
0x94bd42 satisfy_constraint_r
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2577
0x94cd78 satisfy_constraint
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2599
0x94d067 tsubst_nested_requirement
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2006
0x94d067 tsubst_requirement
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2027
0x94d067 tsubst_requirement_body
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2043
0x94d067 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*)
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2159
0xa869ea tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/jwakely/src/gcc/gcc/gcc/cp/pt.c:20336
0xa79767 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/jwakely/src/gcc/gcc/gcc/cp/pt.c:18597
0x94bfea satisfy_atom
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2523
0x94bfea satisfy_constraint_r
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2579
0x94bf26 satisfy_conjunction
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2386
0x94bf26 satisfy_constraint_r
        /home/jwakely/src/gcc/gcc/gcc/cp/constraint.cc:2575
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to