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: PR debug/9717


I applied this patch to the mainline and the branch.  It was tested by
the author.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2003-02-17  Michael Elizabeth Chastain <mec@shout.net>

	PR debug/9717
	* class.c (build_base_field): Mark fields for base classes with
	DECL_IGNORED_P.

Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.519
diff -c -5 -p -r1.519 class.c
*** class.c	15 Feb 2003 18:03:21 -0000	1.519
--- class.c	18 Feb 2003 07:24:06 -0000
*************** build_base_field (record_layout_info rli
*** 3956,3966 ****
        DECL_FIELD_CONTEXT (decl) = t;
        DECL_SIZE (decl) = CLASSTYPE_SIZE (basetype);
        DECL_SIZE_UNIT (decl) = CLASSTYPE_SIZE_UNIT (basetype);
        DECL_ALIGN (decl) = CLASSTYPE_ALIGN (basetype);
        DECL_USER_ALIGN (decl) = CLASSTYPE_USER_ALIGN (basetype);
!   
        /* Try to place the field.  It may take more than one try if we
  	 have a hard time placing the field without putting two
  	 objects of the same type at the same address.  */
        layout_nonempty_base_or_field (rli, decl, binfo, offsets);
        /* Add the new FIELD_DECL to the list of fields for T.  */
--- 3956,3967 ----
        DECL_FIELD_CONTEXT (decl) = t;
        DECL_SIZE (decl) = CLASSTYPE_SIZE (basetype);
        DECL_SIZE_UNIT (decl) = CLASSTYPE_SIZE_UNIT (basetype);
        DECL_ALIGN (decl) = CLASSTYPE_ALIGN (basetype);
        DECL_USER_ALIGN (decl) = CLASSTYPE_USER_ALIGN (basetype);
!       DECL_IGNORED_P (decl) = 1;
! 
        /* Try to place the field.  It may take more than one try if we
  	 have a hard time placing the field without putting two
  	 objects of the same type at the same address.  */
        layout_nonempty_base_or_field (rli, decl, binfo, offsets);
        /* Add the new FIELD_DECL to the list of fields for T.  */


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