aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 9d00148..9dd08e2 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -5257,11 +5257,9 @@ maybe_unconstrained_array (tree exp)
exp = build_component_ref (exp, DECL_CHAIN (TYPE_FIELDS (type)),
false);
- type = TREE_TYPE (exp);
- /* If the array type is padded, convert to the unpadded type. */
- if (TYPE_IS_PADDING_P (type))
- exp = convert (TREE_TYPE (TYPE_FIELDS (type)), exp);
+ /* If the array is padded, remove the padding. */
+ exp = maybe_padded_object (exp);
}
break;