This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77907] [6/7 Regression] Add "const" to argument of constexpr constructor causes the object to be left in unconstructed state
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Nov 2016 18:45:59 +0000
- Subject: [Bug c++/77907] [6/7 Regression] Add "const" to argument of constexpr constructor causes the object to be left in unconstructed state
- Auto-submitted: auto-generated
- References: <bug-77907-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77907
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Nov 23 18:45:27 2016
New Revision: 242790
URL: https://gcc.gnu.org/viewcvs?rev=242790&root=gcc&view=rev
Log:
PR c++/77907
* cp-gimplify.c (cp_fold) <case CALL_EXPR>: When calling constructor
and maybe_constant_value returns non-CALL_EXPR, create INIT_EXPR
with the object on lhs and maybe_constant_value returned expr on rhs.
* g++.dg/cpp0x/pr77907.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr77907.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/testsuite/ChangeLog