+2019-02-27 Richard Biener <rguenther@suse.de>
+
+ PR debug/89514
+ * dwarf2out.c (size_of_die): Key on AT_ref (a)->comdat_type_p
+ rather than on use_debug_types, doing what output_die does.
+ (value_format): Likewise.
+
2019-02-27 Martin Jambor <mjambor@suse.cz>
Martin Sebor <msebor@redhat.com>
we use DW_FORM_ref_addr. In DWARF2, DW_FORM_ref_addr
is sized by target address length, whereas in DWARF3
it's always sized as an offset. */
- if (use_debug_types)
+ if (AT_ref (a)->comdat_type_p)
size += DWARF_TYPE_SIGNATURE_SIZE;
else if (dwarf_version == 2)
size += DWARF2_ADDR_SIZE;
return DW_FORM_flag;
case dw_val_class_die_ref:
if (AT_ref_external (a))
- return use_debug_types ? DW_FORM_ref_sig8 : DW_FORM_ref_addr;
+ {
+ if (AT_ref (a)->comdat_type_p)
+ return DW_FORM_ref_sig8;
+ else
+ return DW_FORM_ref_addr;
+ }
else
return DW_FORM_ref;
case dw_val_class_fde_ref: