OSDN Git Service

* optimize.c (maybe_clone_body): Fix parameter updating.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2001 15:06:42 +0000 (15:06 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2001 15:06:42 +0000 (15:06 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47976 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/optimize.c

index 3a06bac..1e70a56 100644 (file)
@@ -1,3 +1,7 @@
+2001-12-13  Jason Merrill  <jason@redhat.com>
+
+       * optimize.c (maybe_clone_body): Fix parameter updating.
+
 2001-12-12  Jason Merrill  <jason@redhat.com>
 
        * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
index 99d8987..ae343dc 100644 (file)
@@ -181,10 +181,10 @@ maybe_clone_body (fn)
       /* Adjust the parameter names and locations. */
       parm = DECL_ARGUMENTS (fn);
       clone_parm = DECL_ARGUMENTS (clone);
-      /* Update the `this' parameter, which is always first.
-        Sometimes, we end update the `this' parameter twice because
-        we process it again in the loop below.  That is harmless.  */
+      /* Update the `this' parameter, which is always first.  */
       update_cloned_parm (parm, clone_parm);
+      parm = TREE_CHAIN (parm);
+      clone_parm = TREE_CHAIN (clone_parm);
       if (DECL_HAS_IN_CHARGE_PARM_P (fn))
        parm = TREE_CHAIN (parm);
       if (DECL_HAS_VTT_PARM_P (fn))