re PR c++/81942 (ICE on empty constexpr constructor with C++14)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 5 Sep 2017 13:33:44 +0000 (13:33 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 5 Sep 2017 13:33:44 +0000 (13:33 +0000)
commitd49318d9bc3e63251aada27b322e7756eab19884
treec73edc1922313f044d57f416d20fd7978d7f8254
parentae85ad3a95d6df3c4131d02fd327809a29d10b33
re PR c++/81942 (ICE on empty constexpr constructor with C++14)

/cp
2017-09-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81942
* cp-tree.h (LABEL_DECL_CDTOR): Add and document.
* decl.c (start_preparsed_function): Set LABEL_DECL_CDTOR when
creating cdtor_label.
* constexpr.c (returns): Add the case of a constructor/destructor
returning via a LABEL_DECL_CDTOR label.
(cxx_eval_constant_expression, case [GOTO_EXPR]): Likewise.

/testsuite
2017-09-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81942
* g++.dg/cpp1y/constexpr-return3.C: New.

From-SVN: r251714
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-return3.C [new file with mode: 0644]