[PATCH] Obvious fix of -feliminate-dwarf2-dups
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Thu Mar 6 10:23:00 GMT 2003
Hello,
the size of die is computed incorrectly if there are references to
other CU's; I am commiting the attached patch as obvious.
Zdenek
Changelog:
* dwarf2out.c (size_of_die): Compute size of external reference
to die correctly.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.405
diff -c -3 -p -r1.405 dwarf2out.c
*** dwarf2out.c 5 Mar 2003 22:37:52 -0000 1.405
--- dwarf2out.c 6 Mar 2003 00:39:58 -0000
*************** size_of_die (die)
*** 6349,6355 ****
size += 1;
break;
case dw_val_class_die_ref:
! size += DWARF_OFFSET_SIZE;
break;
case dw_val_class_fde_ref:
size += DWARF_OFFSET_SIZE;
--- 6349,6358 ----
size += 1;
break;
case dw_val_class_die_ref:
! if (AT_ref_external (a))
! size += DWARF2_ADDR_SIZE;
! else
! size += DWARF_OFFSET_SIZE;
break;
case dw_val_class_fde_ref:
size += DWARF_OFFSET_SIZE;
More information about the Gcc-patches
mailing list