From: msebor Date: Wed, 16 Dec 2015 23:56:27 +0000 (+0000) Subject: PR objc++/68932 - FAIL: obj-c++.dg/property/at-property-23.mm -fgnu-runtime X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0e01e98c5c7b5f996883f30e0471b32e304f7b5;p=thirdparty%2Fgcc.git PR objc++/68932 - FAIL: obj-c++.dg/property/at-property-23.mm -fgnu-runtime (internal compiler error) cp/ * decl.c (grokdeclarator): Avoid assuming ctype is non-null when checking the validity of a flexible array member. testsuite/ * obj-c++.dg/property/at-property-23.mm: Remove check for an error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231726 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 46b67125a5b8..4d7a5f3ad40b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-12-16 Martin Sebor + + PR objc++/68932 + * decl.c (grokdeclarator): Avoid assuming ctype is non-null when + checking the validity of a flexible array member. + 2015-12-16 Paolo Carlini * pt.c (comp_template_args): Remove. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 77358c4c6856..7d45d4dc1f51 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10933,8 +10933,9 @@ grokdeclarator (const cp_declarator *declarator, if (!staticp && TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type) == NULL_TREE) { - if (TREE_CODE (ctype) == UNION_TYPE - || TREE_CODE (ctype) == QUAL_UNION_TYPE) + if (ctype + && (TREE_CODE (ctype) == UNION_TYPE + || TREE_CODE (ctype) == QUAL_UNION_TYPE)) { error ("flexible array member in union"); type = error_mark_node; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9ce80b1bc10e..63d8b4438193 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-12-16 Martin Sebor + + PR objc++/68932 + * obj-c++.dg/property/at-property-23.mm: Remove check for + an error message. + 2015-12-13 Jeff Law * gcc.dg/tree-ssa/pr68619-4.c: Change size of code bitfield. diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-23.mm b/gcc/testsuite/obj-c++.dg/property/at-property-23.mm index 73138f64c4a3..035cc8b10fe9 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-23.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-23.mm @@ -14,5 +14,4 @@ @property int a[8]; /* { dg-error "property can not be an array" } */ @property int b:8; /* { dg-error "expected" } */ @property int c[]; /* { dg-error "property can not be an array" } */ - /* { dg-error "ISO C.. forbids zero-size array" "" { target *-*-* } 16 } */ @end