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

            Bug ID: 109754
           Summary: [ICE] internal compiler error: in
                    coerce_template_parms, at cp/pt.cc:9183
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

Created attachment 55012
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55012&action=edit
result of -freport-bug including preprocessed source

similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105475, but not using
coroutines

Repro: compile attached code with -std=c++20  

Result:

In file included from test.cpp:1:
stdexec/include/stdexec/__detail/__meta.hpp: In substitution of ‘template<class
_Fn, class ... _Args> using __minvoke = stdexec::__meval<_Fn::template __f,
_Args ...> [with _Fn =
stdexec::__mexpand<stdexec::__tuple<stdexec::__tup::__gen_tuple_fun_fn::operator()<int,
stdexec::__tup::__coerce<immovable>, const char*>(int&&,
stdexec::__tup::__coerce<immovable>&&, const char*&&)
const::<lambda()>::<lambda(_Self&&, _Fun&&)> > >; _Args = {stdexec::__msize}]’:
stdexec/include/stdexec/__detail/__meta.hpp:431:9:   required by substitution
of ‘template<class _Fn, class _List> using __mapply =
stdexec::__minvoke<stdexec::__mexpand<_List>, _Fn> [with _Fn =
stdexec::__msize; _List =
stdexec::__tuple<stdexec::__tup::__gen_tuple_fun_fn::operator()<int,
stdexec::__tup::__coerce<immovable>, const char*>(int&&,
stdexec::__tup::__coerce<immovable>&&, const char*&&)
const::<lambda()>::<lambda(_Self&&, _Fun&&)> >]’
stdexec/include/stdexec/__detail/__tuple.hpp:491:47:   required from ‘const
std::size_t
stdexec::tuple_size_v<stdexec::__tuple<stdexec::__tup::__gen_tuple_fun_fn::operator()<int,
stdexec::__tup::__coerce<immovable>, const char*>(int&&,
stdexec::__tup::__coerce<immovable>&&, const char*&&)
const::<lambda()>::<lambda(_Self&&, _Fun&&)> > >’
test.cpp:22:26:   required from here
stdexec/include/stdexec/__detail/__meta.hpp:233:9: internal compiler error: in
coerce_template_parms, at cp/pt.cc:9183
  233 |   using __minvoke = __meval<_Fn::template __f, _Args...>;
      |         ^~~~~~~~~
0x6623b1 coerce_template_parms
        ../../src/gcc/cp/pt.cc:9183
0x818feb instantiate_alias_template
        ../../src/gcc/cp/pt.cc:21719
0x818feb tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.cc:15607
0x81c344 tsubst_decl
        ../../src/gcc/cp/pt.cc:14952
0x81815a instantiate_template_1
        ../../src/gcc/cp/pt.cc:21643
0x81908e instantiate_template(tree_node*, tree_node*, int)
        ../../src/gcc/cp/pt.cc:21702
0x81908e instantiate_alias_template
        ../../src/gcc/cp/pt.cc:21740
0x81908e tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.cc:15607
0x81c344 tsubst_decl
        ../../src/gcc/cp/pt.cc:14952
0x81815a instantiate_template_1
        ../../src/gcc/cp/pt.cc:21643
0x81908e instantiate_template(tree_node*, tree_node*, int)
        ../../src/gcc/cp/pt.cc:21702
0x81908e instantiate_alias_template
        ../../src/gcc/cp/pt.cc:21740
0x81908e tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.cc:15607
0x825bad tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.cc:13517
0x8108fe tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../src/gcc/cp/pt.cc:20055
0x8200e8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../src/gcc/cp/pt.cc:19491
0x81fe84 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../src/gcc/cp/pt.cc:18462
0x81fe84 instantiate_decl(tree_node*, bool, bool)
        ../../src/gcc/cp/pt.cc:26653
0x7313c1 maybe_instantiate_decl(tree_node*)
        ../../src/gcc/cp/decl2.cc:5627
0x7375ef maybe_instantiate_decl(tree_node*)
        ../../src/gcc/cp/decl2.cc:5614
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.

Reply via email to