aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-25 10:32:21 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-25 10:32:21 +0200
commit0949185aed5830fe40bd4fa4a80b21bc90410406 (patch)
tree522790ddb3d06ada6b6f05f0b85aefb3deef202b /gcc
parent036c83b68e7a958b75d02f392d0cb60f8b6a4ba5 (diff)
downloadgcc-0949185aed5830fe40bd4fa4a80b21bc90410406.zip
gcc-0949185aed5830fe40bd4fa4a80b21bc90410406.tar.gz
gcc-0949185aed5830fe40bd4fa4a80b21bc90410406.tar.bz2
Fix small fallout of earlier change
gcc/ada/ChangeLog * gcc-interface/misc.c (get_array_bit_stride): Get to the debug type, if any, before calling gnat_get_array_descr_info.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/misc.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 769728a..d2020b8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2020-05-25 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/misc.c (get_array_bit_stride): Get to the debug type,
+ if any, before calling gnat_get_array_descr_info.
+
+2020-05-25 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Tidy up.
(build_variant_list): Add GNAT_VARIANT_PART parameter and annotate its
variants if it is present. Adjust the recursive call by passing the
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 5a5850a..f8fa856 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -1003,6 +1003,9 @@ get_array_bit_stride (tree comp_type)
if (INTEGRAL_TYPE_P (comp_type))
return TYPE_RM_SIZE (comp_type);
+ /* The gnat_get_array_descr_info debug hook expects a debug tyoe. */
+ comp_type = maybe_debug_type (comp_type);
+
/* Otherwise, see if this is an array we can analyze; if it's not, punt. */
memset (&info, 0, sizeof (info));
if (!gnat_get_array_descr_info (comp_type, &info) || !info.stride)