diff options
author | Martin Sebor <msebor@redhat.com> | 2015-12-16 23:56:27 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2015-12-16 16:56:27 -0700 |
commit | f3b5cf3ddc88e8818a64173543157af431c8997f (patch) | |
tree | 71210bdfaa1b1e5dde5a8e9e03ec6e94c7026253 /gcc/cp | |
parent | 9625f2a27cd633acd19a1744e8f7439bd7a5715d (diff) | |
download | gcc-f3b5cf3ddc88e8818a64173543157af431c8997f.zip gcc-f3b5cf3ddc88e8818a64173543157af431c8997f.tar.gz gcc-f3b5cf3ddc88e8818a64173543157af431c8997f.tar.bz2 |
PR objc++/68932 - FAIL: obj-c++.dg/property/at-property-23.mm -fgnu-runtime
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.
From-SVN: r231726
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 46b6712..4d7a5f3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-12-16 Martin Sebor <msebor@redhat.com> + + 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 <paolo.carlini@oracle.com> * pt.c (comp_template_args): Remove. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 77358c4..7d45d4d 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; |