From: Jason Merrill Date: Mon, 17 Mar 2003 23:16:55 +0000 (-0500) Subject: * decl.c (finish_function): Don't skip a block. X-Git-Tag: releases/gcc-3.2.3~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b85591bb8833f7a334f1faef5e4f29ece735bc2;p=thirdparty%2Fgcc.git * decl.c (finish_function): Don't skip a block. From-SVN: r64508 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 28883b2b91e1..888fcb988a23 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2003-03-17 Jason Merrill + * 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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 7ba863d4347e..82ea2279ab24 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -14319,8 +14319,7 @@ finish_function (flags) 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)))) {