This is the mail archive of the gcc-bugs@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]

Re: c++/4122


I was able to strip down the testcase to the attached file. Note that it
makes a difference where the last destructor is defined:
ritzert@darkstar:~/tmp/gccbug > c++ -c i.cpp && nm -C i.o | grep _non_ex
00000000 W PortableServer::ServantBase::_non_existent()
         U non-virtual thunk to
PortableServer::ServantBase::_non_existent()
ritzert@darkstar:~/tmp/gccbug > c++ -c i.cpp -D OK && nm -C i.o | grep
_non_ex
ritzert@darkstar:~/tmp/gccbug >

HTH.

Michael

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4122&database=gcc
namespace PortableServer
{
	class ServantBase
	{
	protected:
		ServantBase() { }
	public:
		virtual void _non_existent() {};
	};

	class RefCountServantBase : public virtual ServantBase
	{
	};
}

namespace POA_CORBA
{
	class IRObject : virtual public PortableServer::ServantBase
	{
	public:
		IRObject() { }
	};
}


namespace CORBA
{
	class IRObject_impl : public virtual PortableServer::RefCountServantBase,
		public virtual POA_CORBA::IRObject
{
};

}


namespace POA_CORBA
{
	class Container : virtual public POA_CORBA::IRObject
	{
	public:
		Container() { }
	};
}


namespace CORBA
{
	class Container_impl : public virtual POA_CORBA::Container,
		public virtual IRObject_impl
	{
	public:
		Container_impl() {};
		virtual ~Container_impl() {}
	};
}

namespace CORBA
{
	class Repository_impl : public virtual Container_impl
	{
	public:
		Repository_impl() {};
#ifndef OK
		virtual ~Repository_impl();
#else
		virtual ~Repository_impl() {};
#endif
	};
}

#ifndef OK
CORBA::Repository_impl::~Repository_impl()
{
}
#endif


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