optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the cloned function to the...
authorMark Mitchell <mark@codesourcery.com>
Wed, 11 Apr 2001 19:45:49 +0000 (19:45 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 11 Apr 2001 19:45:49 +0000 (19:45 +0000)
* optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
cloned function to the clone.

From-SVN: r41267

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

index 6183bb8f06c25d7a7faa56c4c617c48d3044819f..704c7fc5ec0d8a269c40178817aef884654e8489 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-11  Mark Mitchell  <mark@codesourcery.com>
+
+       * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
+       cloned function to the clone.
+
 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
index 5232491ef8e4f63f7e8d62a2a1dfdea1a16a01ca..8f6fd0e6fcfc1f27f82da31404d15dadb6fccb53 100644 (file)
@@ -1114,6 +1114,10 @@ maybe_clone_body (fn)
       /* Actually copy the body.  */
       TREE_CHAIN (DECL_SAVED_TREE (clone)) = copy_body (&id);
 
+      /* There are as many statements in the clone as in the
+        original.  */
+      DECL_NUM_STMTS (clone) = DECL_NUM_STMTS (fn);
+
       /* Clean up.  */
       splay_tree_delete (id.decl_map);
       VARRAY_FREE (id.fns);