diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 899d5b83ebb..1ffe58977ee 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5054,7 +5054,7 @@ count_type_elements (const_tree type, bool allow_flexarr) HOST_WIDE_INT n = 0, t; tree f; - for (f = TYPE_FIELDS (type); f ; f = TREE_CHAIN (f)) + for (f = TYPE_FIELDS (type); f ; f = DECL_CHAIN (f)) if (TREE_CODE (f) == FIELD_DECL) { t = count_type_elements (TREE_TYPE (f), false); @@ -5063,7 +5063,7 @@ count_type_elements (const_tree type, bool allow_flexarr) /* Check for structures with flexible array member. */ tree tf = TREE_TYPE (f); if (allow_flexarr - && TREE_CHAIN (f) == NULL + && DECL_CHAIN (f) == NULL && TREE_CODE (tf) == ARRAY_TYPE && TYPE_DOMAIN (tf) && TYPE_MIN_VALUE (TYPE_DOMAIN (tf)) |