Make __PRETTY_FUNCTION__-like functions mergeable string csts (PR c++/64266).
authorMartin Liska <mliska@suse.cz>
Thu, 1 Nov 2018 09:19:31 +0000 (10:19 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 1 Nov 2018 09:19:31 +0000 (09:19 +0000)
commitddd0d18c9c07025d578f445dc9a3544020861197
treefc18f31e77d64af9f8639b83af8e225bb3023243
parent964f78b7e75a4dd4c5c68cec0858270fbfc1d37b
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
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/lambda.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-__func__2.C
gcc/testsuite/g++.old-deja/g++.ext/pretty4.C [deleted file]