Commit 7a9a00be by Mike Stump

stmt.c (expand_return): We have to be careful of cleanups that can be generated when...

        * stmt.c (expand_return): We have to be careful of cleanups that can
        be generated when expanding the return value, as they might otherwise
        wipe out the return value.

From-SVN: r8167
parent 0f05a13c
...@@ -2513,7 +2513,15 @@ expand_return (retval) ...@@ -2513,7 +2513,15 @@ expand_return (retval)
} }
/* Are any cleanups needed? E.g. C++ destructors to be run? */ /* Are any cleanups needed? E.g. C++ destructors to be run? */
/* This is not sufficient. We also need to watch for cleanups of the
expression we are about to expand. Unfortunately, we cannot know
if it has cleanups until we expand it, and we want to change how we
expand it depending upon if we need cleanups. We can't win. */
#if 0
cleanups = any_pending_cleanups (1); cleanups = any_pending_cleanups (1);
#else
cleanups = 1;
#endif
if (TREE_CODE (retval) == RESULT_DECL) if (TREE_CODE (retval) == RESULT_DECL)
retval_rhs = retval; retval_rhs = retval;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment