aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-11-01 10:19:31 +0100
committerMartin Liska <marxin@gcc.gnu.org>2018-11-01 09:19:31 +0000
commitddd0d18c9c07025d578f445dc9a3544020861197 (patch)
treefc18f31e77d64af9f8639b83af8e225bb3023243 /gcc/cp/lambda.c
parent964f78b7e75a4dd4c5c68cec0858270fbfc1d37b (diff)
downloadgcc-ddd0d18c9c07025d578f445dc9a3544020861197.zip
gcc-ddd0d18c9c07025d578f445dc9a3544020861197.tar.gz
gcc-ddd0d18c9c07025d578f445dc9a3544020861197.tar.bz2
Make __PRETTY_FUNCTION__-like functions mergeable string csts (PR c++/64266).
2018-11-01 Martin Liska <mliska@suse.cz> Jason Merrill <jason@redhat.com> PR c++/64266 PR bootstrap/70422 PR ipa/81277 * cp-tree.h (DECL_FNAME_P): New macro. * decl.c (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P, DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. (cp_finish_decl): * lambda.c (is_capture_proxy): Use DECL_FNAME_P. * pt.c (tsubst_expr): Handle DECL_PRETTY_FUNCTION_P. 2018-11-01 Martin Liska <mliska@suse.cz> Jason Merrill <jason@redhat.com> PR c++/64266 PR bootstrap/70422 PR ipa/81277 * g++.dg/cpp0x/constexpr-__func__2.C: Make it a compilation test. * g++.old-deja/g++.ext/pretty4.C: Remove as the run-time assumptions are not longer valid. Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r265711
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 297327f..318671b 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -262,6 +262,7 @@ is_capture_proxy (tree decl)
&& DECL_HAS_VALUE_EXPR_P (decl)
&& !DECL_ANON_UNION_VAR_P (decl)
&& !DECL_DECOMPOSITION_P (decl)
+ && !DECL_FNAME_P (decl)
&& LAMBDA_FUNCTION_P (DECL_CONTEXT (decl)));
}