re PR debug/84131 (Fortran dynamical array debug info)
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 Jan 2018 22:57:51 +0000 (23:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 Jan 2018 22:57:51 +0000 (23:57 +0100)
PR debug/84131
* trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
to DATA_FIELD's offset rather than OFFSET_FIELD's offset.

From-SVN: r257212

gcc/fortran/ChangeLog
gcc/fortran/trans-array.c

index 35894cda5d04b4377a898f476a525fc7ec0d755b..3613d855a388110c9040bb8ff9fb9c6d4b3614c4 100644 (file)
@@ -1,3 +1,9 @@
+2018-01-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/84131
+       * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
+       to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
+
 2017-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/84134
index c16b8754fa3b3bf4dfc7e56491007b399a2b9945..40703419d51119a49695de514af25bea149fc67c 100644 (file)
@@ -511,7 +511,7 @@ gfc_get_descriptor_offsets_for_info (const_tree desc_type, tree *data_off,
   tree type;
 
   type = TYPE_MAIN_VARIANT (desc_type);
-  field = gfc_advance_chain (TYPE_FIELDS (type), OFFSET_FIELD);
+  field = gfc_advance_chain (TYPE_FIELDS (type), DATA_FIELD);
   *data_off = byte_position (field);
   field = gfc_advance_chain (TYPE_FIELDS (type), DTYPE_FIELD);
   *dtype_off = byte_position (field);