* tree-inline.c (copy_body_r): Do not replace ret_label.
authorJosef Zlomek <zlomekj@suse.cz>
Sat, 14 Feb 2004 19:38:46 +0000 (20:38 +0100)
committerJosef Zlomek <zlomek@gcc.gnu.org>
Sat, 14 Feb 2004 19:38:46 +0000 (19:38 +0000)
From-SVN: r77820

gcc/ChangeLog
gcc/tree-inline.c

index 35a77099b28ce3efa6705eab7e70a5e5bae74272..d960d6044a275d4ed54569956448fa5d1f879de7 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-14  Josef Zlomek  <zlomekj@suse.cz>
+
+       * tree-inline.c (copy_body_r): Do not replace ret_label.
+
 2004-02-14  Jan Hubicka  <jh@suse.cz>
 
        * i386.c (x86_four_jump_limit): New variable.
index 6d3fcf87f203357c18e21faf25d85fd0fa1674d3..ce0b415fe057750418d305adb1360710444e8bf5 100644 (file)
@@ -572,8 +572,11 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
   /* 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))
+     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;