From: Mark Mitchell Date: Wed, 11 Apr 2001 19:45:49 +0000 (+0000) Subject: optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the cloned function to the... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b7949d5ffff47d657935da2ea6ec5aa3e77f9a7;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6183bb8f06c..704c7fc5ec0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-04-11 Mark Mitchell + + * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the + cloned function to the clone. + 2001-04-11 Kaveh R. Ghazi * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 5232491ef8e..8f6fd0e6fcf 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);