https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96471

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 49008
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49008&action=edit
hackish patch

The following implements this (just the very special case of a single location
expression with a direct DIE ref).  It also re-orders note_variable_value
which might be an obvious part.

Now the question is whether such a type unit makes sense:

 <0><17>: Abbrev Number: 1 (DW_TAG_type_unit)
    <18>   DW_AT_language    : 14       (Fortran 95)
    <19>   DW_AT_stmt_list   : 0x0
 <1><1d>: Abbrev Number: 2 (DW_TAG_structure_type)
    <1e>   DW_AT_name        : (indirect string, offset: 0x1d0):
FRAME.cmumps_sc
atter_dist_rhs
    <22>   DW_AT_byte_size   : 32
    <23>   DW_AT_sibling     : <0x58>
 <2><27>: Abbrev Number: 3 (DW_TAG_member)
    <28>   DW_AT_name        : (indirect string, offset: 0x1b6):
posinrhscomp_fw
d
    <2c>   DW_AT_decl_file   : 1
    <2d>   DW_AT_decl_line   : 1
    <2e>   DW_AT_type        : <0x58>
    <32>   DW_AT_data_member_location: 0
...
 <1><58>: Abbrev Number: 4 (DW_TAG_restrict_type)
    <59>   DW_AT_type        : <0x64>
...
 <1><64>: Abbrev Number: 6 (DW_TAG_pointer_type)
    <65>   DW_AT_byte_size   : 8
    <66>   DW_AT_type        : <0x70>
...
 <1><70>: Abbrev Number: 8 (DW_TAG_array_type)
    <71>   DW_AT_type        : <0x83>
    <75>   DW_AT_sibling     : <0x83>
 <2><79>: Abbrev Number: 9 (DW_TAG_subrange_type)
    <7a>   DW_AT_type        : <0x8a>
    <7e>   DW_AT_upper_bound : <0x9a>
...
 <1><91>: Abbrev Number: 11 (DW_TAG_subprogram)
    <92>   DW_AT_external    : 1
    <92>   DW_AT_name        : (indirect string, offset: 0x1e):
cmumps_scatter_dist_rhs
    <96>   DW_AT_linkage_name: (indirect string, offset: 0x5c):
cmumps_scatter_dist_rhs_
    <9a>   DW_AT_declaration : 1
 <2><9a>: Abbrev Number: 12 (DW_TAG_variable)
    <9b>   DW_AT_type        : <0x8a>
    <9f>   DW_AT_artificial  : 1

Reply via email to