PR c++/51633 - ICEs with constexpr constructor
authorDodji Seketeli <dodji@redhat.com>
Thu, 12 Jan 2012 23:28:46 +0000 (23:28 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Thu, 12 Jan 2012 23:28:46 +0000 (00:28 +0100)
commit1cef710256a340b7a13e00f8a088b5709569e0c6
tree20aed99bf958983ce825e6124ec717166396a71a
parent639d4bb87cd62a6b136ba653cc3e8fddec4f0fd6
PR c++/51633 - ICEs with constexpr constructor

gcc/cp/

PR c++/51633
* semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
Set the pointer to the last block of the constructor to the
current statement.
(build_constexpr_constructor_member_initializers): Get
build_data_member_initialization a chance to deal with more
statements before we choke.

gcc/testsuite/

PR c++/51633
* g++.dg/cpp0x/constexpr-diag4.C: New test.

From-SVN: r183144
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-diag5.C [new file with mode: 0644]