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.