From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30182 invoked by alias); 26 Jan 2004 20:10:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30170 invoked from network); 26 Jan 2004 20:10:31 -0000 Received: from unknown (HELO artax.karlin.mff.cuni.cz) (195.113.31.125) by sources.redhat.com with SMTP; 26 Jan 2004 20:10:31 -0000 Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 29129) id 9AC063F0C; Mon, 26 Jan 2004 21:10:30 +0100 (CET) Date: Mon, 26 Jan 2004 20:12:00 -0000 From: Josef Zlomek To: gcc-patches@gcc.gnu.org Subject: Unreviewed patch Message-ID: <20040126201030.GA12961@artax.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i X-SW-Source: 2004-01/txt/msg02915.txt.bz2 Hello, plase could somebody look at http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02220.html It fixes a bug triggered when inlining function x into y and then y into x. Thanks. Joe Here is the updated patch with comment: Index: tree-inline.c =================================================================== RCS file: /cvs/gcc-cvs/gcc/gcc/tree-inline.c,v retrieving revision 1.34.2.17 diff -c -p -c -3 -p -r1.34.2.17 tree-inline.c *** tree-inline.c 3 Jan 2004 18:13:44 -0000 1.34.2.17 --- tree-inline.c 26 Jan 2004 20:09:30 -0000 *************** copy_body_r (tp, walk_subtrees, data) *** 490,497 **** /* Local variables and labels need to be replaced by equivalent variables. We don't want to copy static variables; there's only one of those, no matter how many times we inline the containing ! function. */ ! else if ((*lang_hooks.tree_inlining.auto_var_in_fn_p) (*tp, fn)) { tree new_decl; --- 490,500 ---- /* Local variables and labels need to be replaced by equivalent variables. We don't want to copy static variables; there's only one of those, no matter how many times we inline the containing ! function. ! We do not also want to copy the label which we put into ! GOTO_STMT which replaced RETURN_STMT. */ ! else if (*tp != id->ret_label ! && (*lang_hooks.tree_inlining.auto_var_in_fn_p) (*tp, fn)) { tree new_decl;