PR c++/88196 - ICE with class non-type template parameter.
authorMarek Polacek <polacek@redhat.com>
Fri, 21 Dec 2018 03:34:06 +0000 (03:34 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 21 Dec 2018 03:34:06 +0000 (03:34 +0000)
commit906a9283a5d53f21f032af8e4a22358b1b0f1ec9
tree004d3f42778cd2106784612f357fe3cf9efb6f2f
parent6647c1e86f3b311d906a19b85182eed010ec03cf
PR c++/88196 - ICE with class non-type template parameter.

* pt.c (convert_nontype_argument): If the expr is a PTRMEM_CST, also
check if the type we're converting it to is TYPE_PTRMEM_P.

* g++.dg/cpp0x/ptrmem-cst-arg1.C: Tweak dg-error.
* g++.dg/cpp2a/nontype-class10.C: New test.
* g++.dg/template/pr54858.C: Tweak dg-error.

From-SVN: r267319
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/ptrmem-cst-arg1.C
gcc/testsuite/g++.dg/cpp2a/nontype-class10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/pr54858.C