public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/13539] New: dbxout.c does not recognize protected inheritance
@ 2004-01-01  6:06 mec dot gnu at mindspring dot com
  2004-01-01  6:37 ` [Bug debug/13539] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-01-01  6:06 UTC (permalink / raw)
  To: gcc-bugs

Here is a small source program:

  class B { public: int bb; };
  class D : private B { public: int dd; };
  D d;
  int main () { return 0; }

I compile with: gcc -gstabs+ -S

The stabs for "class D" says:

.stabs 
"D:Tt(1,10)=s8!1,000,(1,1);dd:(0,1),32,32;operator=::(1,11)=#(1,10),(1,12)=&(1,10),(1,13)=*(1,10),(1,14)=&(1,15)=k(1,10),(1,7);:_ZN1DaSERKS_;2A.;__base_ctor::(1,16)=#(1,10),(1,7),(1,13),(1,14),(1,7);:_ZN1DC2ERKS_;2A.;__comp_ctor::(1,16):_ZN1DC1ERKS_;2A.;__base_ctor::(1,17)=#(1,10),(1,7),(1,13),(1,7);:_ZN1DC2Ev;2A.;__comp_ctor::(1,17):_ZN1DC1Ev;2A.;;",128,0,8,0

The problem is in the base class fields:

  !1, 000

This says: D has one base.  The first base in non-virtual, private, at offset 0.

The attributes should be "010" instead of "000".

The problem is in dbxout.c function dbxout_type:

  if (use_gnu_debug_info_extensions)
    {
      have_used_extensions = 1;
      putc (TREE_VIA_VIRTUAL (child) ? '1' : '0', asmfile);
      putc (access == access_public_node ? '2' : '0', asmfile);
      CHARS (2);
      ...
     }

This shows up in the gdb test suite with test file derivation.exp.  I reported
it as PR gdb/1498 as a gdb PR, but it's not gdb's fault.

-- 
           Summary: dbxout.c does not recognize protected inheritance
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mec dot gnu at mindspring dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-liinux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13539


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-01-27 13:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-01  6:06 [Bug debug/13539] New: dbxout.c does not recognize protected inheritance mec dot gnu at mindspring dot com
2004-01-01  6:37 ` [Bug debug/13539] " pinskia at gcc dot gnu dot org
2004-01-01  6:42 ` pinskia at gcc dot gnu dot org
2004-01-01  6:43 ` pinskia at gcc dot gnu dot org
2004-01-01  6:44 ` pinskia at gcc dot gnu dot org
2004-01-01  6:56 ` pinskia at gcc dot gnu dot org
2004-01-01  7:06 ` mec dot gnu at mindspring dot com
2004-01-02  9:10 ` mec dot gnu at mindspring dot com
2004-01-02 13:55 ` pinskia at gcc dot gnu dot org
2004-01-02 14:12 ` pinskia at gcc dot gnu dot org
2004-01-10 15:57 ` pinskia at gcc dot gnu dot org
2004-01-12 19:50 ` cvs-commit at gcc dot gnu dot org
2004-01-12 19:54 ` pinskia at gcc dot gnu dot org
2004-01-27 14:03 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).