This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB 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]

Re: c++/1026: regression in casts.exp from gcc 3.2.1 to gcc gcc-3_3-branch%20030128


The following reply was made to PR c++/1026; it has been noted by GNATS.

From: Michael Elizabeth Chastain <mec@shout.net>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: c++/1026: regression in casts.exp from gcc 3.2.1 to gcc gcc-3_3-branch%20030128
Date: Sun, 16 Feb 2003 11:38:26 -0600

 I binary searched this down to the range of 2002-09-09 to 2002-10-01
 in gcc HEAD.
 
 It appears to be this patch from Mark Mitchell:
 
   http://gcc.gnu.org/ml/gcc-patches/2002-09/msg01814.html
 
 Specifically, there is a change in in cp/class.c build_base_field.
 
 build_base_field constructs a 'decl' for the base class and calls
 layout_nonempty_base_or_field to place the base class at an offset.
 Mark's patch adds some new code:
 
   !       /* Add the new FIELD_DECL to the list of fields for T.  */
   !       TREE_CHAIN (decl) = *next_field;
   !       *next_field = decl;
   !       next_field = &TREE_CHAIN (decl);
 
 This new code causes the decl to appear in the stabs+ debug output
 as an unnamed structure at the appropriate offset and size.
 gdb does not like to see this structure.
 
 I think this is easy to fix with a 1-line patch.
 I don't know gcc internals so the patch might be bogus,
 but I'm trying this out in my test bed today.
 
 (And I do have a copyright assignment on file for gcc
  so I can actually submit this!)
 
 Index: class.c
 ===================================================================
 RCS file: /cvsroot/gcc/gcc/gcc/cp/class.c,v
 retrieving revision 1.518
 diff -u -r1.518 class.c
 --- class.c     30 Jan 2003 16:02:54 -0000      1.518
 +++ class.c     16 Feb 2003 17:36:16 -0000
 @@ -3958,6 +3958,7 @@
        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
 


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