c++: NTTP with array/function type after substitution [PR61355]
authorPatrick Palka <ppalka@redhat.com>
Thu, 7 Oct 2021 20:39:16 +0000 (16:39 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 7 Oct 2021 20:39:16 +0000 (16:39 -0400)
commitfba228e259dd5112851527f2dbb62c5601100985
tree9a1fbd7f782c54df55ab225ed1be057e3f3b0b8a
parent7f78718b7958f603d50d5c30fd8735d73900bd1f
c++: NTTP with array/function type after substitution [PR61355]

We're performing the [temp.param]/10 adjustment at parse time but not
also at substitution time.

PR c++/61355

gcc/cp/ChangeLog:

* pt.c (convert_template_argument): Perform array/function to
pointer conversion on the substituted type of an NTTP.

gcc/testsuite/ChangeLog:

* g++.old-deja/g++.pt/nontype5.C: Adjust.
* g++.dg/template/param6.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/template/param6.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/nontype5.C