public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3132: Missing dtor thunk with complicated virtual derivation
@ 2001-06-12  1:39 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2001-06-12  1:39 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, nobody, snyder

Synopsis: Missing dtor thunk with complicated virtual derivation

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Tue Jun 12 01:39:31 2001
Responsible-Changed-Why:
    ow ow ow ow ow
State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Tue Jun 12 01:39:31 2001
State-Changed-Why:
    stop it, it's hurting!

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3132&database=gcc


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

* Re: c++/3132: Missing dtor thunk with complicated virtual derivation
@ 2001-06-12 11:07 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2001-06-12 11:07 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, snyder

Synopsis: Missing dtor thunk with complicated virtual derivation

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Tue Jun 12 11:07:13 2001
State-Changed-Why:
    see 3130

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3132&database=gcc


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

* c++/3132: Missing dtor thunk with complicated virtual derivation
@ 2001-06-11 17:56 snyder
  0 siblings, 0 replies; 3+ messages in thread
From: snyder @ 2001-06-11 17:56 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3132
>Category:       c++
>Synopsis:       Missing dtor thunk with complicated virtual derivation
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 11 17:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     scott snyder
>Release:        3.0 20010611 (prerelease)
>Organization:
>Environment:
System: Linux karma 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long
>Description:

If i try to compile and link the source below, i get complaints from the
linker about a missing virtual thunk for ~H:

[sss@karma translator]$ g++ -o xidl xidl.cpp
/tmp/ccXy7K6j.o(.gnu.linkonce.d._ZTV1H+0x40): undefined reference to `virtual thunk to H::~H()'
/tmp/ccXy7K6j.o(.gnu.linkonce.d._ZTV1H+0x44): undefined reference to `virtual thunk to H::~H()'
collect2: ld returned 1 exit status


The generated object file includes these symbols, shown here mangled
and unmangled:

xidl.o:00000000 W _ZTv0_n12_N1HD0Ev
xidl.o:00000000 W _ZTv0_n12_N1HD1Ev
xidl.o:         U _ZTv0_n16_N1HD0Ev
xidl.o:         U _ZTv0_n16_N1HD1Ev


xidl.o:00000000 W virtual thunk to H::~H()
xidl.o:00000000 W virtual thunk to H::~H()
xidl.o:         U virtual thunk to H::~H()
xidl.o:         U virtual thunk to H::~H()


Is this a name mangling problem?


>How-To-Repeat:

---------------------------------------------
struct A
{
  int x;
  virtual ~A() {}
};

struct B
{
  virtual ~B() {  }
};


struct C
{
  virtual ~C () {}
};


struct D : public virtual A {};
struct E : virtual public B, virtual public D {};
struct F : virtual public C, virtual public E {};
struct G : public virtual E {};

struct H : public virtual F, public virtual G
{
  virtual ~H ();
};
H::~H() {}




int main ()
{
  return 0;
}
---------------------------------------------


>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:
 
 I have this patch from Nathan installed:
 
 2001-06-11  Nathan Sidwell  <nathan@codesourcery.com>
 
 	PR c++/3089
 	* class.c (dfs_accumulate_vtbl_inits): Always walk down the
 	hierarchy looking for primary bases for a ctor
 	vtable. Recursively call oneself, if we meet our primary via
 	this route and haven't met it yet via inheritance graph order.
 


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

end of thread, other threads:[~2001-06-12 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-12  1:39 c++/3132: Missing dtor thunk with complicated virtual derivation nathan
  -- strict thread matches above, loose matches on Subject: below --
2001-06-12 11:07 nathan
2001-06-11 17:56 snyder

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).