The assume_function field of struct function currently not copied over
when cloning a function.  That wasn't an issue, as assumes were created
as noclone.  This series makes cloning of assumes possible, so this bug
needs to be fixed.

gcc/ChangeLog:

        * tree-inline.cc (initialize_cfun): Copy over assume_function to
        cfun when cloning.

Signed-off-by: Josef Melcr <[email protected]>
---
 gcc/tree-inline.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc
index 8162b1f5051..01d66537d42 100644
--- a/gcc/tree-inline.cc
+++ b/gcc/tree-inline.cc
@@ -2896,6 +2896,7 @@ initialize_cfun (tree new_fndecl, tree callee_fndecl, 
profile_count count)
   cfun->can_delete_dead_exceptions = src_cfun->can_delete_dead_exceptions;
   cfun->returns_struct = src_cfun->returns_struct;
   cfun->returns_pcc_struct = src_cfun->returns_pcc_struct;
+  cfun->assume_function = src_cfun->assume_function;
 
   init_empty_tree_cfg ();
 
-- 
2.55.0

Reply via email to