aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 21c5fe1..66c06c9 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3581,9 +3581,10 @@ type_contains_placeholder_1 (const_tree type)
|| CONTAINS_PLACEHOLDER_P (TYPE_MAX_VALUE (type)));
case ARRAY_TYPE:
- /* We have already checked the component type above, so just check the
- domain type. */
- return type_contains_placeholder_p (TYPE_DOMAIN (type));
+ /* We have already checked the component type above, so just check
+ the domain type. Flexible array members have a null domain. */
+ return TYPE_DOMAIN (type) ?
+ type_contains_placeholder_p (TYPE_DOMAIN (type)) : false;
case RECORD_TYPE:
case UNION_TYPE: