[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/26755] [4.1 regression?] may fail to generate code for base destructor defined inline




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

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.



Reply to: