This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/61595] Inconsistent DWARF information for arrays of vector types
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jun 2014 11:49:57 +0000
- Subject: [Bug debug/61595] Inconsistent DWARF information for arrays of vector types
- Auto-submitted: auto-generated
- References: <bug-61595-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61595
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You are clearly misreading what the standard says.
DW_AT_type on DW_TAG_subrange_type is the basis type of the subrange.
Say if you have array char a[5];, then the subrange of the array is 0:5 and the
type of the subrange is the type of the 0 and 5 constants - the lower/upper
bounds.
If you continue reading 5.11, you'll see that if DW_AT_type is missing on the
subrange, then it defaults to the type of DW_AT_lower_bound object, or
DW_AT_upper_bound object (if they are object), or integer with the size of
address. Nothing related to the element type, the subrange is not about
elements, but extents of the array.