PR c++/69251 - [6 Regression] ICE in unify_array_domain on a flexible array
authorMartin Sebor <msebor@gcc.gnu.org>
Thu, 4 Feb 2016 04:50:42 +0000 (21:50 -0700)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 4 Feb 2016 04:50:42 +0000 (21:50 -0700)
commit05dd97db3c29364ea3fc8fc2a658586a9469db79
treec95b5fda5f7341a303dd2415b1a7bb2caabcd8b8
parentdac2fc29181a6905dd5a61f1582cf946b3424ca7
PR c++/69251 - [6 Regression] ICE in unify_array_domain on a flexible array

PR c++/69251 - [6 Regression] ICE in unify_array_domain on a flexible array
               member
PR c++/69253 - [6 Regression] ICE in cxx_incomplete_type_diagnostic initializing
               a flexible array member with empty string
PR c++/69290 - [6 Regression] ICE on invalid initialization of a flexible array
               member
PR c++/69277 - [6 Regression] ICE mangling a flexible array member
PR c++/69349 - template substitution error for flexible array members

gcc/testsuite/ChangeLog:
2016-02-03  Martin Sebor  <msebor@redhat.com>

PR c++/69251
PR c++/69253
PR c++/69290
PR c++/69277
PR c++/69349
* g++.dg/ext/flexarray-mangle-2.C: New test.
* g++.dg/ext/flexarray-mangle.C: New test.
* g++.dg/ext/flexarray-subst.C: New test.
* g++.dg/ext/flexary11.C: New test.
* g++.dg/ext/flexary12.C: New test.
* g++.dg/ext/flexary13.C: New test.
* g++.dg/ext/flexary14.C: New test.
* g++.dg/other/dump-ada-spec-2.C: Adjust.

gcc/cp/ChangeLog:
2016-02-03  Martain Sebor  <msebor@redhat.com>

PR c++/69251
PR c++/69253
PR c++/69290
PR c++/69277
PR c++/69349
* class.c (walk_subobject_offsets): Avoid testing the upper bound
of a flexible array member for equality to null.
(find_flexarrays): Remove spurious whitespace introduced in r231665.
(diagnose_flexarrays): Avoid checking the upper bound of arrays.
(check_flexarrays): Same.
* decl.c (compute_array_index_type): Avoid special case for flexible
array members.
(grokdeclarator): Avoid calling compute_array_index_type for flexible
array members.
* error.c (dump_type_suffix): Revert changes introduced in r231665
and rendered unnecessary by the changes above.
* pt.c (tsubst):  Same.
* tree.c (build_ctor_subob_ref): Handle flexible array members.
* typeck2.c (digest_init_r): Revert changes introduced in r231665.
(process_init_constructor_array): Same.
(process_init_constructor_record): Same.

From-SVN: r233126
17 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/cp/error.c
gcc/cp/mangle.c
gcc/cp/pt.c
gcc/cp/tree.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/flexarray-mangle-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/flexarray-mangle.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/flexarray-subst.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/flexary11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/flexary12.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/flexary13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/flexary14.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/dump-ada-spec-2.C