public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103706] New: [11/12 Regression] ICE: tree check: accessed elt 1 of 'tree_vec' with 0 elts in hash, at cp/constraint.cc:2503
@ 2021-12-14  7:51 asolokha at gmx dot com
  2021-12-14  7:59 ` [Bug c++/103706] " pinskia at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: asolokha at gmx dot com @ 2021-12-14  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103706
           Summary: [11/12 Regression] ICE: tree check: accessed elt 1 of
                    'tree_vec' with 0 elts in hash, at
                    cp/constraint.cc:2503
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++ 12.0.0 20211212 snapshot (g:0b52083ea2c2dd9897031fdc3802a68fd4aa45ef) ICEs
when compiling the following testcase, extracted from
test/SemaTemplate/concepts.cpp, w/ -std=c++20:

namespace PackInTypeConstraint {
  template<typename T, typename U> concept C = sizeof(T) == sizeof(int);

  template<typename ...T> void g5() {
    ([]() -> C<T> auto{
     return T();
     }(), ...);
  }
  template void g5<int, int, int>();
}

% g++-12.0.0 -std=c++20 -c gpb6lyci.cpp
gpb6lyci.cpp: In instantiation of 'void PackInTypeConstraint::g5() [with T =
{int, int, int}]':
gpb6lyci.cpp:9:35:   required from here
gpb6lyci.cpp:6:15: internal compiler error: tree check: accessed elt 1 of
'tree_vec' with 0 elts in hash, at cp/constraint.cc:2503
    6 |      return T();
      |               ^
0x869dcd tree_vec_elt_check_failed(int, int, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/tree.c:8903
0x996fa5 tree_vec_elt_check(tree_node*, int, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/tree.h:3662
0x996fa5 sat_hasher::hash(sat_entry*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:2503
0x992c43 hash_table<sat_hasher, false, xcallocator>::find_slot(sat_entry*
const&, insert_option)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/hash-table.h:435
0x992c43 satisfaction_cache::satisfaction_cache(tree_node*, tree_node*,
sat_info)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:2597
0x995e2e satisfy_atom
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:2913
0x995e2e satisfy_constraint_r
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:3022
0x9966d3 satisfy_normalized_constraints
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:3047
0x99437f satisfy_nondeclaration_constraints
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:3137
0x99437f constraint_satisfaction_value
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:3289
0x996794 constraints_satisfied_p(tree_node*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/constraint.cc:3321
0xb10490 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/pt.c:30019
0xbbcd18 check_return_expr(tree_node*, bool*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/typeck.c:10423
0xb64f7f finish_return_stmt(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/semantics.c:1193
0xb2bdd8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/pt.c:18235
0xb2bd7b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/pt.c:18582
0xb419e6 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/pt.c:18211
0xb419e6 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/pt.c:19583
0xb17eb2 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/pt.c:21074
0xb1638a tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/pt.c:20412

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-04-12 23:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14  7:51 [Bug c++/103706] New: [11/12 Regression] ICE: tree check: accessed elt 1 of 'tree_vec' with 0 elts in hash, at cp/constraint.cc:2503 asolokha at gmx dot com
2021-12-14  7:59 ` [Bug c++/103706] " pinskia at gcc dot gnu.org
2021-12-14  8:08 ` asolokha at gmx dot com
2021-12-14  8:09 ` pinskia at gcc dot gnu.org
2021-12-14  8:09 ` pinskia at gcc dot gnu.org
2022-01-31 16:28 ` ppalka at gcc dot gnu.org
2022-01-31 16:28 ` ppalka at gcc dot gnu.org
2022-02-08 13:48 ` cvs-commit at gcc dot gnu.org
2022-02-08 13:48 ` cvs-commit at gcc dot gnu.org
2022-02-08 13:55 ` [Bug c++/103706] [11 " ppalka at gcc dot gnu.org
2022-02-08 13:55 ` ppalka at gcc dot gnu.org
2022-04-12 23:44 ` cvs-commit at gcc dot gnu.org
2022-04-12 23:44 ` cvs-commit at gcc dot gnu.org
2022-04-12 23:46 ` ppalka at gcc dot gnu.org

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).