c++: Dependent conversion operator in concept [PR94597]
authorPatrick Palka <ppalka@redhat.com>
Tue, 21 Apr 2020 14:56:57 +0000 (10:56 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 21 Apr 2020 14:56:57 +0000 (10:56 -0400)
commit08d6ec14e654292340ccc6aa5612bbd91d4d57e8
treea0ebe0da9ad73b875f0ec24408d16429fe71ebe2
parent6c0ab626113ef20ee2986cb8a102b5394aeb888a
c++: Dependent conversion operator in concept [PR94597]

When building the parameter mapping for an atomic constraint,
find_template_parameters does not spot the template parameter within the
conversion-type-id of a dependent conversion operator, which later leads to an
ICE during substitution when looking up the missing template argument for this
unnoticed template parameter.

gcc/cp/ChangeLog:

PR c++/94597
* pt.c (any_template_parm_r) <case IDENTIFIER_NODE>: New case.  If this
is a conversion operator, visit its TREE_TYPE.

gcc/testsuite/ChangeLog:

PR c++/94597
* g++.dg/cpp2a/concepts-conv2.C: New test.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C [new file with mode: 0644]