This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3175: CTOR/DTOR Mismatch Error
- To: bcrowder at station dot sony dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rodrigc at gcc dot gnu dot org
- Subject: Re: c++/3175: CTOR/DTOR Mismatch Error
- From: rodrigc at gcc dot gnu dot org
- Date: 2 Sep 2001 08:22:48 -0000
Synopsis: CTOR/DTOR Mismatch Error
State-Changed-From-To: open->feedback
State-Changed-By: rodrigc
State-Changed-When: Sun Sep 2 01:22:47 2001
State-Changed-Why:
What is the correct output of your program
supposed to be? I tested it with gcc 3.0.1 and
got:
Build an empty Bar
(0x0804a280) FooRef CTOR(0)
(0xbffff6f0) Foo CTOR(0)
(0xbffff6f0) Bar CTOR(0)
New a Bar with stuff in it
(0x0804a2a0) FooRef CTOR(1234)
(0x0804a290) Foo CTOR(1234)
(0x0804a290) Bar CTOR(1234)
PROBLEM HERE, unbalanced Foo DTOR!!
(0xbffff6d0) Foo Copy CTOR(1234, count:2)
(0xbffff6d0) Bar Copy CTOR(1234)
(0xbffff6e0) Foo Copy CTOR(1234, count:3)
(0x0804a280) FooRef DTOR(0)
(0xbffff6f0) Foo OP=(1234, count:4)
(0xbffff6e0) Foo DTOR(1234, count:3)
(0xbffff6d0) Bar DTOR(1234)
(0xbffff6d0) Foo DTOR(1234, count:2)
Destroy Bar with stuff
(0x0804a290) Bar DTOR(1234)
(0x0804a290) Foo DTOR(1234, count:1)
End stack...
(0xbffff6f0) Bar DTOR(1234)
(0xbffff6f0) Foo DTOR(1234, count:0)
(0x0804a2a0) FooRef DTOR(1234)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3175&database=gcc