public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102047] New: ICE in template_parms_to_args passing lambda-quoted constraint to meta-concept
@ 2021-08-24 16:25 ed at catmur dot uk
  2021-08-24 16:30 ` [Bug c++/102047] " ed at catmur dot uk
  0 siblings, 1 reply; 2+ messages in thread
From: ed at catmur dot uk @ 2021-08-24 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102047
           Summary: ICE in template_parms_to_args passing lambda-quoted
                    constraint to meta-concept
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ed at catmur dot uk
  Target Milestone: ---

template<class> concept A = true;
template<class T, auto L> concept M = requires {
    L.template operator()<T()>();
};
template<class T> concept C = requires(T t) {
    { t.x } -> M<[]<A>(){}>;
};
struct S { double x; };
static_assert(C<S>);

g++
(Compiler-Explorer-Build-gcc-8ca7fa84a3af355c3e2bbda2acc61934c16078b2-binutils-2.36.1)
12.0.0 20210823 (experimental)

6:18: internal compiler error: Segmentation fault
    6 |     { t.x } -> M<[]<A>(){}>;
      |                  ^~~~~~~~~
0x1de2c99 internal_error(char const*, ...)
0x99d20d template_parms_to_args(tree_node*)
0x9e74ea tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
0x9db8d0 tsubst_template_arg(tree_node*, tree_node*, int, tree_node*)
0x7d702a constraints_satisfied_p(tree_node*, tree_node*)
0x9a6a67 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
0x7d6fe2 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*)
0x7d7088 evaluate_concept_check(tree_node*)
0x7c26f4 maybe_constant_value(tree_node*, tree_node*, bool)
0xa2b65d finish_static_assert(tree_node*, tree_node*, unsigned int, bool, bool)
0x980395 c_parse_file()
0xb05462 c_common_parse_file()

Clang also ICEs; MSVC accepts.

Possibly related to #99465.

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

* [Bug c++/102047] ICE in template_parms_to_args passing lambda-quoted constraint to meta-concept
  2021-08-24 16:25 [Bug c++/102047] New: ICE in template_parms_to_args passing lambda-quoted constraint to meta-concept ed at catmur dot uk
@ 2021-08-24 16:30 ` ed at catmur dot uk
  0 siblings, 0 replies; 2+ messages in thread
From: ed at catmur dot uk @ 2021-08-24 16:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Ed Catmur <ed at catmur dot uk> ---
cf. https://bugs.llvm.org/show_bug.cgi?id=51604

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

end of thread, other threads:[~2021-08-24 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 16:25 [Bug c++/102047] New: ICE in template_parms_to_args passing lambda-quoted constraint to meta-concept ed at catmur dot uk
2021-08-24 16:30 ` [Bug c++/102047] " ed at catmur dot uk

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