This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/13044] New: Calls to stack object destructors should be merged for multiple return points


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]