https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97995
Bug ID: 97995 Summary: [11 Regression] ICE tree check: expected tree that contains 'typed' structure, have 'deferred_noexcept' in unify, at cp/pt.c:23473 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20200621 and 20200628 : $ cat z1.cc struct S; template <class T> void foo () noexcept (T::v); template <class ...A, int b> void bar (void (A...) noexcept (b)); static_assert (bar (foo<S>); $ g++-11-20201122 -c z1.cc z1.cc: In substitution of 'template<class ... A, int b> void bar(void (*)(A ...) noexcept (b)) [with A = <missing>; int b = <missing>]': z1.cc:5:27: required from here z1.cc:5:27: internal compiler error: tree check: expected tree that contains 'typed' structure, have 'deferred_noexcept' in unify, at cp/pt.c:23473 5 | static_assert (bar (foo<S>); | ^ 0x6527ab tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.c:9984 0x8a0193 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.h:3431 0x8a0193 unify ../../gcc/cp/pt.c:23473 0x89eb1c unify ../../gcc/cp/pt.c:23796 0x89dcbe unify ../../gcc/cp/pt.c:23563 0x8a03cf try_one_overload ../../gcc/cp/pt.c:22522 0x89b45a resolve_overloaded_unification ../../gcc/cp/pt.c:22286 0x89b45a unify_one_argument ../../gcc/cp/pt.c:21832 0x8bb1b4 type_unification_real ../../gcc/cp/pt.c:21976 0x8d1300 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool, bool) ../../gcc/cp/pt.c:21345 0x6a1332 add_template_candidate_real ../../gcc/cp/call.c:3431 0x6a2014 add_template_candidate ../../gcc/cp/call.c:3519 0x6a2014 add_candidates ../../gcc/cp/call.c:5929 0x6a7e0b add_candidates ../../gcc/cp/call.c:4553 0x6a7e0b perform_overload_resolution ../../gcc/cp/call.c:4561 0x6afef2 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ../../gcc/cp/call.c:4635 0x8fbdec finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/cp/semantics.c:2703 0x846165 cp_parser_postfix_expression ../../gcc/cp/parser.c:7556 0x850915 cp_parser_unary_expression ../../gcc/cp/parser.c:8659 0x820faf cp_parser_cast_expression ../../gcc/cp/parser.c:9562