PR c++/92582 - ICE with member template as requirement.
authorJason Merrill <jason@redhat.com>
Mon, 13 Jan 2020 22:38:19 +0000 (17:38 -0500)
committerJason Merrill <jason@redhat.com>
Tue, 14 Jan 2020 01:30:18 +0000 (20:30 -0500)
commit8ca4435f431f9b8049ebf102b5659f2d3e7be198
tree577caca36cad64bb399b2dd2efec17d348921b36
parentf1ba88b1b20cb579b3b7ce6ce65470205742be7e
PR c++/92582 - ICE with member template as requirement.

Here, we weren't recognizing that the template parameter of A is used by the
reference to d in the requires-clause of f.  Fixed by passing down the
active template parameters in the context of normalization, and adding to
the mapping any such parameters shared by a member template used in the
constraint-expression.

* pt.c (struct find_template_parameter_info): Add ctx_parms.
(any_template_parm_r): Handle TEMPLATE_DECL.
(find_template_parameters): Take parms instead of their depth.
* constraint.cc (build_parameter_mapping): Pass them.
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl3.C [new file with mode: 0644]