c++: consteval and explicit instantiation [PR96905]
authorJason Merrill <jason@redhat.com>
Mon, 8 Feb 2021 22:16:14 +0000 (17:16 -0500)
committerJason Merrill <jason@redhat.com>
Tue, 9 Feb 2021 01:52:11 +0000 (20:52 -0500)
commit57d705da0b98f5d398c4b8f9bd76fe8ad98e13bc
tree1b36fb8df77b80cd451aa0bfc19394173e5368db
parentbdbca69e0720fa9062fe71782235141f629ae006
c++: consteval and explicit instantiation [PR96905]

Normally, an explicit instantiation means we want to write out the
instantiation.  But not for a consteval function.

gcc/cp/ChangeLog:

PR c++/96905
* pt.c (mark_decl_instantiated): Exit early if consteval.

gcc/testsuite/ChangeLog:

PR c++/96905
* g++.dg/cpp2a/consteval-expinst1.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/consteval-expinst1.C [new file with mode: 0644]