2003-03-17 Jason Merrill <jason@redhat.com>
+ * decl.c (finish_function): Don't skip a block.
+
PR c++/9993
* decl.c (finish_function): Only allow the NRVO to use variables
declared at function scope.
the function so we know that their lifetime always ends with a
return; see g++.dg/opt/nrv6.C. We could be more flexible if
we were to do this optimization in tree-ssa. */
- /* Skip the artificial function body block. */
- && (outer = BLOCK_SUBBLOCKS (BLOCK_SUBBLOCKS (DECL_INITIAL (fndecl))),
+ && (outer = BLOCK_SUBBLOCKS (DECL_INITIAL (fndecl)),
chain_member (r, BLOCK_VARS (outer))))
{