https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110552
Bug ID: 110552 Summary: ICE on valid code in maybe_instantiate_noexcept Product: gcc Version: 14.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 55469 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55469&action=edit self-contained source file Compile the attached source with -std=c++20. Result: /home/eniebler/hello_world.cpp: In substitution of ‘template<class _EnvProvider> requires tag_invocable<stdexec::__env::get_env_t, const _EnvProvider&> constexpr stdexec::__tag_invoke::tag_invoke_result_t<stdexec::__env::get_env_t, const _EnvProvider&> stdexec::__env::get_env_t::operator()(const _EnvProvider&) const [with _EnvProvider = stdexec::__basic_sender<<lambda(_Data, _Children ...)>::<lambda(_Cvref, _Fun&&)> >]’: /home/eniebler/hello_world.cpp:2221:16: required from here /home/eniebler/hello_world.cpp:1465:59: internal compiler error: in maybe_instantiate_noexcept, at cp/pt.cc:26753 1465 | requires(_Tag __tag, _Args&&... __args) { tag_invoke((_Tag&&) __tag, (_Args&&) __args...); }; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0xace10a maybe_instantiate_noexcept(tree_node*, int) ../../gcc/cp/pt.cc:26753 0x96272f mark_used(tree_node*, int) ../../gcc/cp/decl2.cc:5720 0x864a35 build_over_call ../../gcc/cp/call.cc:10394 0x867e0b build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ../../gcc/cp/call.cc:5038 0xb304ff finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/cp/semantics.cc:2924 0xacc4e5 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.cc:21338 0xabb964 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.cc:19888 0x8c3193 tsubst_valid_expression_requirement ../../gcc/cp/constraint.cc:2002 0x8cc3c0 tsubst_simple_requirement ../../gcc/cp/constraint.cc:2036 0x8cc3c0 tsubst_requirement ../../gcc/cp/constraint.cc:2233 0x8cc3c0 tsubst_requires_expr ../../gcc/cp/constraint.cc:2363 0x8cc8aa tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/constraint.cc:2382 0xac96c7 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.cc:21749 0xabb964 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.cc:19888 0x8cde63 satisfy_atom ../../gcc/cp/constraint.cc:3041 0x8cde63 satisfy_constraint_r ../../gcc/cp/constraint.cc:3106 0x8ce723 satisfy_normalized_constraints ../../gcc/cp/constraint.cc:3131 0x8caefd satisfy_declaration_constraints ../../gcc/cp/constraint.cc:3352 0x8caefd constraint_satisfaction_value ../../gcc/cp/constraint.cc:3373 0x8ce78f constraints_satisfied_p(tree_node*, tree_node*) ../../gcc/cp/constraint.cc:3410 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. See https://godbolt.org/z/1511TYvch for a demo of the bug on compiler explorer.