[Bug c++/50373] Incorrect Code generated for function with two possible return values (Seg Fault)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 13 07:48:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50373
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution| |INVALID
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-13 07:41:05 UTC ---
The program is just invalid. You don't have explicit copy constructor,
therefore it is defined implicitly and performs memberwise assignment of
subobjects. This means that you delete [] the same pointer twice.
More information about the Gcc-bugs
mailing list