This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Obvious fix of -feliminate-dwarf2-dups


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]