This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH V4 5/6] Resolve dynamic target types of pointers.


On 20/10/2016 17:33, Yao Qi wrote:
On Mon, Oct 17, 2016 at 1:18 PM, Bernhard Heckel
<bernhard.heckel@intel.com> wrote:
I just looked again in the specification. It is not a bug.
FORTRAN specification (http://www.j3-fortran.org/doc/year/04/04-007.pdf)
mention this as "array pointer"

In "Glossary of technical terms", array pointer (5.1.2.5.3) : A pointer to an
array, so it is a pointer, not an array.

In your example,

   integer, pointer, dimension (:) :: intvlap

It is a pointer in the debug information generated by icc.  IMO, it is correct,

- <1><78>: Abbrev Number: 4 (DW_TAG_pointer_type)
-    <79>   DW_AT_type        : <0x83>
-    <7d>   DW_AT_associated  : 5 byte block: 97 6 10 0 2e
(DW_OP_push_object_address; DW_OP_deref; DW_OP_constu: 0; DW_OP_ne)
- <1><83>: Abbrev Number: 5 (DW_TAG_array_type)
-    <84>   DW_AT_ordering    : 1       (column major)
-    <85>   DW_AT_type        : <0xa9>
-    <89>   DW_AT_data_location: 2 byte block: 97 6
(DW_OP_push_object_address; DW_OP_deref)
- <2><8c>: Abbrev Number: 6 (DW_TAG_subrange_type)
-    <8d>   DW_AT_byte_stride : 5 byte block: 97 10 38 22 6
(DW_OP_push_object_address; DW_OP_constu: 56; DW_OP_plus; DW_OP_deref)
-    <93>   DW_AT_upper_bound : 14 byte block: 97 10 40 22 6 97 10 30
22 6 22 10 1 1c   (DW_OP_push_object_address; DW_OP_constu: 64;
DW_OP_plus; DW_OP_deref; DW_OP_push_object_address; DW_OP_constu: 48;
DW_OP_plus; DW_OP_deref; DW_OP_plus; DW_OP_constu: 1; DW_OP_minus)
-    <a2>   DW_AT_lower_bound : 5 byte block: 97 10 40 22 6
(DW_OP_push_object_address; DW_OP_constu: 64; DW_OP_plus; DW_OP_deref)
- <2><a8>: Abbrev Number: 0

however, it is an array in the debug information generated by gfortran,
which is wrong.

+ <1><d1>: Abbrev Number: 9 (DW_TAG_array_type)
+    <d2>   DW_AT_data_location: 2 byte block: 97 6
(DW_OP_push_object_address; DW_OP_deref)
+    <d5>   DW_AT_associated  : 4 byte block: 97 6 30 2e
(DW_OP_push_object_address; DW_OP_deref; DW_OP_lit0; DW_OP_ne)
+    <da>   DW_AT_type        : <0xca>
+    <de>   DW_AT_sibling     : <0xf5>
+ <2><e2>: Abbrev Number: 8 (DW_TAG_subrange_type)
+    <e3>   DW_AT_lower_bound : 4 byte block: 97 23 20 6
(DW_OP_push_object_address; DW_OP_plus_uconst: 32; DW_OP_deref)
+    <e8>   DW_AT_upper_bound : 4 byte block: 97 23 28 6
(DW_OP_push_object_address; DW_OP_plus_uconst: 40; DW_OP_deref)
+    <ed>   DW_AT_byte_stride : 6 byte block: 97 23 18 6 34 1e
(DW_OP_push_object_address; DW_OP_plus_uconst: 24; DW_OP_deref;
DW_OP_lit4; DW_OP_mul)
+ <2><f4>: Abbrev Number: 0


Created a ticket
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78059

Can we agree to move forward with a "known fail" for Gfortran?



Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]