summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-02 02:28:25 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-02 02:28:25 +0000
commit8afcf8310b963b9f903b119060b6c363f8a18fe8 (patch)
treee73101948543e48f9fa6eaa1f25cffe11c9ab0be /gcc/cp/decl2.c
parent399fbdbdddd6ea476c7f47d20bd2ceb0be827218 (diff)
downloadgcc-8afcf8310b963b9f903b119060b6c363f8a18fe8.tar.gz
PR c++/65942
* decl2.c (mark_used): Don't always instantiate constexpr fns. * constexpr.c (cxx_eval_call_expression): Instantiate them here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index f1b3d0cbc6a..8ba19cfda19 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -5046,8 +5046,7 @@ mark_used (tree decl, tsubst_flags_t complain)
&& DECL_TEMPLATE_INFO (decl)
&& (decl_maybe_constant_var_p (decl)
|| (TREE_CODE (decl) == FUNCTION_DECL
- && (DECL_DECLARED_CONSTEXPR_P (decl)
- || DECL_OMP_DECLARE_REDUCTION_P (decl)))
+ && DECL_OMP_DECLARE_REDUCTION_P (decl))
|| undeduced_auto_decl (decl))
&& !uses_template_parms (DECL_TI_ARGS (decl)))
{