c++: Avoid concept evaluation when uid-sensitive [PR94038]
authorPatrick Palka <ppalka@redhat.com>
Sat, 23 May 2020 18:39:28 +0000 (14:39 -0400)
committerPatrick Palka <ppalka@redhat.com>
Sat, 23 May 2020 18:39:28 +0000 (14:39 -0400)
commit6d1556ecfae3eff010ef7dc15f3da998403fa196
tree97e25bb6e9824b291ae5e5bd1cfc0be8a18596ca
parent3cb0c7cc160a50f830bfa9aa5a3264b773a28bf8
c++: Avoid concept evaluation when uid-sensitive [PR94038]

Concept evaluation may entail DECL_UID generation and/or template
instantiation, so in general we can't perform it during uid-sensitive
constexpr evaluation.

gcc/cp/ChangeLog:

PR c++/94038
* constexpr.c (cxx_eval_constant_expression)
<case TEMPLATE_ID_EXPR>: Don't evaluate the concept when
constexpr evaluation is uid-sensitive.

gcc/testsuite/ChangeLog:

PR c++/94038
* g++.dg/warn/pr94038-3.C: New test.
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/pr94038-3.C [new file with mode: 0644]