diff options
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index ab5ca5b..d5dd04a 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -2902,12 +2902,10 @@ create_var_decl (tree name, tree asm_name, tree type, tree init, return var_decl; } -/* Return true if TYPE, an aggregate type, contains (or is) an array. - If SELF_REFERENTIAL is true, then an additional requirement on the - array is that it be self-referential. */ +/* Return true if TYPE, an aggregate type, contains (or is) an array. */ -bool -aggregate_type_contains_array_p (tree type, bool self_referential) +static bool +aggregate_type_contains_array_p (tree type) { switch (TREE_CODE (type)) { @@ -2918,14 +2916,13 @@ aggregate_type_contains_array_p (tree type, bool self_referential) tree field; for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) if (AGGREGATE_TYPE_P (TREE_TYPE (field)) - && aggregate_type_contains_array_p (TREE_TYPE (field), - self_referential)) + && aggregate_type_contains_array_p (TREE_TYPE (field))) return true; return false; } case ARRAY_TYPE: - return self_referential ? type_contains_placeholder_p (type) : true; + return true; default: gcc_unreachable (); @@ -2935,7 +2932,7 @@ aggregate_type_contains_array_p (tree type, bool self_referential) /* Return true if TYPE is a type with variable size or a padding type with a field of variable size or a record that has a field with such a type. */ -static bool +bool type_has_variable_size (tree type) { tree field; @@ -3037,7 +3034,7 @@ create_field_decl (tree name, tree type, tree record_type, tree size, tree pos, || (!pos && type_has_variable_size (type)) || (!pos && AGGREGATE_TYPE_P (type) - && aggregate_type_contains_array_p (type, false)))) + && aggregate_type_contains_array_p (type)))) SET_DECL_ALIGN (field_decl, BITS_PER_UNIT); /* Bump the alignment if need be, either for bitfield/packing purposes or |