This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13044] New: Calls to stack object destructors should be merged for multiple return points
- From: "bryner at brianryner dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2003 02:33:32 -0000
- Subject: [Bug optimization/13044] New: Calls to stack object destructors should be merged for multiple return points
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Currently, if you allocate an object on the stack which has a destructor, and
there are multiple return statements in the function, gcc may unnecessarily
duplicate the code to call the destructor.
A workaround is to use a variable to hold the return value so that you only have
one return statement, but it's not always easy to do this and keep the code clean.
--
Summary: Calls to stack object destructors should be merged for
multiple return points
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bryner at brianryner dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13044