This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36012] New: Wrong initialization in operator new.
- From: "s__nakayama at infoseek dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Apr 2008 15:33:20 -0000
- Subject: [Bug c++/36012] New: Wrong initialization in operator new.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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