re PR c++/64266 (Can GCC produce local mergeable symbols for *.__FUNCTION__ and ...
authorJason Merrill <jason@redhat.com>
Fri, 25 Mar 2016 21:29:26 +0000 (17:29 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 25 Mar 2016 21:29:26 +0000 (17:29 -0400)
commitd7796e23a4a973afdc45897de4932c1e1bd3e898
tree539f2664a65fff87648c21b1f5ed7a833fe023c8
parent31ce75c698abe262a047888af4d02f280abc8ba1
re PR c++/64266 (Can GCC produce local mergeable symbols for *.__FUNCTION__ and *.__PRETTY_FUNCTION__ functions?)

PR c++/64266
PR c++/70353
Core issue 1962
* decl.c (cp_fname_init): Decay the initializer to pointer.
(cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P,
DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
Don't call cp_finish_decl.
* pt.c (tsubst_expr) [DECL_EXPR]: Set DECL_VALUE_EXPR,
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.  Don't call cp_finish_decl.
* constexpr.c (cxx_eval_constant_expression) [VAR_DECL]:
Handle DECL_VALUE_EXPR.

Co-Authored-By: Martin Liska <mliska@suse.cz>
From-SVN: r234484
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/decl.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/constexpr-__func__2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/fnname5.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.ext/pretty4.C [deleted file]