Repository navigation
[GNATS 21382] assertion failed at: "templates.c", line 2355 in template_template_arg_matches_param #109
jhsedg
started this conversation in
Issue Triage - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Customer bug ID
contains.cpp
Description
Reduced boost test.
template <typename a, typename b = a> b c(int);
template auto d() -> decltype(c(0));
template using e = typename a ::f;
struct g {
template constexpr auto operator()(h &&) const;
} i;
template <template class> struct j;
template <template <typename...> class h> j k;
template <typename h, typename... l, typename = decltype(d()(d...))>
void m();
template <typename...> void m();
template struct n {
template <typename... l> void operator()(l...) { m<h, l...>; }
};
template constexpr auto g::operator()(h &&) const {
return n{};
}
main() {
using o = int;
auto q = i([](auto p) -> decltype(k<e<decltype(p)>::nested>) {});
q(o{});
}
[ellen@lin1 ~]$ eccp --c++17 --gnu=80300 /tmp/reduced.C
"/tmp/reduced.C", line 18: warning: return type "int" omitted in declaration of
function "main"
main() {
^
"/tmp/reduced.C", line 13: warning: expression has no effect
template <typename... l> void operator()(l...) { m<h, l...>; }
^
"/tmp/reduced.C", line 2: internal error: assertion failed at: "templates.c",
line 2355 in template_template_arg_matches_param
template auto d() -> decltype(c(0));
^
1 catastrophic error detected in the compilation of "/tmp/reduced.C".
Compilation aborted.
Aborted (core dumped)
eccp: front end returned an exit status of 134
-----> Context in template_template_arg_matches_param ( ):
param_template);
} /* if /
/ In EXPENSIVE_CHECKING configurations we make sure the new checking
is a superset of the old. */
check_assertion(!do_old_style_check ||
(old_style_match ? match : TRUE));
-----> Abbreviated stack trace:
assertion_failed
template_template_arg_matches_param
substitute_template_argument
copy_template_arg_list_with_substitution
copy_template_arg_list_with_substitution_rebuilding_arg_operands
make_operand_for_rescanned_identifier
rescan_expr_with_substitution_internal
make_rescan_operand_full
make_rescan_operand
scan_decltype_operator
decltype_of_expr_with_substitution
-----> assertion_failed crash signatures: 4e4f9bbf7133315204d807df655815d0 from 0e0c1606008702aaec7c6c97082a
All reactions