testcase #include <assert.h> struct foo { virtual void bar(){ } int foo::*baz; };
int main() { foo* x = new foo(); assert (x->baz == foo().baz); } result $ g++43 bug.cpp -o bag; ./bug assertion "x->baz == foo().baz" failed: file "bug.cpp", line 11 -- Summary: Wrong initialization in operator new. Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: s__nakayama at infoseek dot jp http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36012