diff options
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bf00e6b..4060019 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2019-06-29 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add + missing guard for the presence of TYPE_CANONICAL. + (set_reverse_storage_order_on_array_type): Likewise. + +2019-06-29 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/gigi.h (make_packable_type): Remove default value. (value_factor_p): Tweak prototype. * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment. diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 4d33814..e38986b 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -6150,7 +6150,8 @@ static void set_nonaliased_component_on_array_type (tree type) { TYPE_NONALIASED_COMPONENT (type) = 1; - TYPE_NONALIASED_COMPONENT (TYPE_CANONICAL (type)) = 1; + if (TYPE_CANONICAL (type)) + TYPE_NONALIASED_COMPONENT (TYPE_CANONICAL (type)) = 1; } /* Set TYPE_REVERSE_STORAGE_ORDER on an array type built by means of @@ -6160,7 +6161,8 @@ static void set_reverse_storage_order_on_array_type (tree type) { TYPE_REVERSE_STORAGE_ORDER (type) = 1; - TYPE_REVERSE_STORAGE_ORDER (TYPE_CANONICAL (type)) = 1; + if (TYPE_CANONICAL (type)) + TYPE_REVERSE_STORAGE_ORDER (TYPE_CANONICAL (type)) = 1; } /* Return true if DISCR1 and DISCR2 represent the same discriminant. */ |