https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92582
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:8ca4435f431f9b8049ebf102b5659f2d3e7be198 commit r10-5937-g8ca4435f431f9b8049ebf102b5659f2d3e7be198 Author: Jason Merrill <ja...@redhat.com> Date: Mon Jan 13 17:38:19 2020 -0500 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.