[fpc-devel] unused dwarf entries produced by FPC
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Oct 8 13:13:19 CEST 2013
On 08 Oct 2013, at 13:04, Martin wrote:
> I ask here before reporting on mantis, maybe I overlooked something
>
> program Test_Record_var_param;
> type
> TFoo = record
> a,b: Integer;
> end;
> PFoo = ^TFoo;
> var
> r1, r2: TFoo;
> p1, p2: PFoo;
> begin
> P1 := @r1;
> P2 := @r1;
> end.
>
> objdump.exe -Wia Test_Record_var_param.exe
>
> Shows an dwarf entry
> <1><f1>: Abbrev Number: 7 (DW_TAG_reference_type)
> <f2> DW_AT_type : <0xcb>
>
>
> This entry is not referenced by any other entry. IT seems unused.
> Also (afaik) there should not be a DW_TAG_reference_type, as P1 and
> P2 are DW_TAG_pointer_type
Reference types are generated for every type to use when a call-by-
reference parameter with this type exists. This is by design.
Jonas
More information about the fpc-devel
mailing list