From d1e5845e975358a15181c43e2e95286c2e17dc0d Mon Sep 17 00:00:00 2001
From: mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 11 Apr 2001 19:45:49 +0000
Subject: [PATCH] 	* optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS
 from the 	cloned function to the clone.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41267 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/cp/ChangeLog  | 5 +++++
 gcc/cp/optimize.c | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6183bb8f06c2..704c7fc5ec0d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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).
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 5232491ef8e4..8f6fd0e6fcfc 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -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);
-- 
GitLab