This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77907] [6/7 Regression] Add "const" to argument of constexpr constructor causes the object to be left in unconstructed state


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]