Unreviewed patch
Josef Zlomek
zlomj9am@artax.karlin.mff.cuni.cz
Mon Jan 26 20:12:00 GMT 2004
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;
More information about the Gcc-patches
mailing list