[Bug c++/77907] [6/7 Regression] Add "const" to argument of constexpr constructor causes the object to be left in unconstructed state
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 23 18:50:00 GMT 2016
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
More information about the Gcc-bugs
mailing list