This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26755] [4.1 regression?] may fail to generate code for base destructor defined inline
- From: "ben at decadentplace dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2006 02:07:55 -0000
- Subject: [Bug c++/26755] [4.1 regression?] may fail to generate code for base destructor defined inline
- References: <bug-26755-5724@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from ben at decadentplace dot org dot uk 2006-03-26 02:07 -------
Here's a trivial test case:
$ cat test.hpp
#ifdef USE_PRAGMA
#pragma interface
#endif
class foo
{
public:
virtual ~foo() {}
};
class bar : public foo
{
public :
~bar();
};
$ cat test.cpp
#include "test.hpp"
#ifdef USE_PRAGMA
#pragma implementation
#endif
bar::~bar()
{
}
$ g++-4.0 -c test.cpp && nm --no-demangle test.o | grep _ZN3fooD
00000000 W _ZN3fooD0Ev
00000000 W _ZN3fooD1Ev
00000000 W _ZN3fooD2Ev
$ g++-4.0 -DUSE_PRAGMA -c test.cpp && nm --no-demangle test.o | grep _ZN3fooD
00000000 W _ZN3fooD2Ev
$ g++-4.1 -c test.cpp && nm --no-demangle test.o | grep _ZN3fooD
00000000 W _ZN3fooD0Ev
00000000 W _ZN3fooD1Ev
00000000 W _ZN3fooD2Ev
$ g++-4.1 -DUSE_PRAGMA -c test.cpp && nm --no-demangle test.o | grep _ZN3fooD
U _ZN3fooD2Ev
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26755