re PR c++/79535 (ICE in verify_ctor_sanity, at cp/constexpr.c:2636)
authorMarek Polacek <polacek@redhat.com>
Tue, 21 Feb 2017 20:23:09 +0000 (20:23 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 21 Feb 2017 20:23:09 +0000 (20:23 +0000)
commita232a1cb1792bef3776dd4bddb7ef484790f8648
tree4590cdaaddcae61143a8e8bc8a1ea54029fdb264
parenta2b48844ed315cdceef32e22f15268eca0c71785
re PR c++/79535 (ICE in verify_ctor_sanity, at cp/constexpr.c:2636)

PR c++/79535
* cp-tree.h (maybe_reject_flexarray_init): Declare.
* init.c (maybe_reject_flexarray_init): No longer static.
Add check for current_function_decl.
* parser.c (cp_parser_late_parse_one_default_arg): Reject
a default mem-initializer for a flexible array.

* g++.dg/ext/flexary23.C: New test.

From-SVN: r245641
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/flexary23.C [new file with mode: 0644]