optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the cloned function to the clone.

* optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
	cloned function to the clone.

From-SVN: r41267
This commit is contained in:
Mark Mitchell 2001-04-11 19:45:49 +00:00 committed by Mark Mitchell
parent 2f5bf149f2
commit 9b7949d5ff
2 changed files with 9 additions and 0 deletions

View 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).

View 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);