Index: except.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/except.c,v retrieving revision 1.227.2.24.2.12 diff -u -d -b -w -p -r1.227.2.24.2.12 except.c --- except.c 17 Nov 2004 22:07:30 -0000 1.227.2.24.2.12 +++ except.c 4 Dec 2004 04:32:12 -0000 @@ -3919,13 +3919,6 @@ get_eh_throw_stmt_table (struct function return fun->eh->throw_stmt_table; } -htab_t -get_maybe_saved_eh_throw_stmt_table (struct function *fun) -{ - return fun->saved_eh ? fun->saved_eh->throw_stmt_table - : fun->eh->throw_stmt_table; -} - int get_eh_last_region_number (struct function *ifun) { Index: except.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/except.h,v retrieving revision 1.64.2.13.2.3 diff -u -d -b -w -p -r1.64.2.13.2.3 except.h --- except.h 17 Nov 2004 22:07:33 -0000 1.64.2.13.2.3 +++ except.h 4 Dec 2004 04:32:12 -0000 @@ -172,7 +172,6 @@ struct throw_stmt_node GTY(()) void remove_eh_handler (struct eh_region *); extern void set_eh_throw_stmt_table (struct function *, void *); extern struct htab *get_eh_throw_stmt_table (struct function *); -extern struct htab *get_maybe_saved_eh_throw_stmt_table (struct function *); extern int get_eh_last_region_number (struct function *); extern int get_eh_cur_region (struct function *); extern void set_eh_cur_region (struct function *, int); Index: tree-eh.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree-eh.c,v retrieving revision 1.1.2.23.2.11 diff -u -d -b -w -p -r1.1.2.23.2.11 tree-eh.c --- tree-eh.c 17 Nov 2004 22:07:44 -0000 1.1.2.23.2.11 +++ tree-eh.c 4 Dec 2004 04:32:12 -0000 @@ -191,7 +191,7 @@ duplicate_stmt_eh_region_mapping (struct htab_t cfun_hash, ifun_hash; void **slot; - ifun_hash = (htab_t)get_maybe_saved_eh_throw_stmt_table (ifun); + ifun_hash = (htab_t)get_eh_throw_stmt_table (ifun); if (!ifun_hash) return; Index: tree-inline.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v retrieving revision 1.26.2.83.2.16 diff -u -d -b -w -p -r1.26.2.83.2.16 tree-inline.c --- tree-inline.c 1 Dec 2004 23:35:45 -0000 1.26.2.83.2.16 +++ tree-inline.c 4 Dec 2004 04:32:12 -0000 @@ -110,6 +110,10 @@ typedef struct inline_data tree callee; /* FUNCTION_DECL for function being inlined into. */ tree caller; + /* struct function for function being inlined. Usually this is the same + as DECL_STRUCT_FUNCTION (callee), but can be different if saved_cfg + and saved_eh are in use. */ + struct function *callee_cfun; /* The label to jump to when a return statement is encountered. If this value is NULL, then return statements will simply be remapped as return statements, rather than as jumps. */ @@ -733,11 +737,11 @@ copy_body_r (tree *tp, int *walk_subtree to reflect the callee's region, so don't look at that.) */ if (id->saving_p || id->cloning_p) duplicate_stmt_eh_region_mapping ( - DECL_STRUCT_FUNCTION (id->callee), cfun, + id->callee_cfun, cfun, old_node, *tp, 0); else duplicate_stmt_eh_region_mapping ( - DECL_STRUCT_FUNCTION (id->callee), + id->callee_cfun, DECL_STRUCT_FUNCTION (id->caller), old_node, *tp, 1); } @@ -825,6 +829,7 @@ copy_cfg_body (inline_data *id) DECL_SAVED_TREE (new_fndecl) = cfun_to_copy->saved_tree; DECL_ARGUMENTS (new_fndecl) = cfun_to_copy->saved_args; } + id->callee_cfun = cfun_to_copy; DECL_STRUCT_FUNCTION (new_fndecl) = new_cfun; push_cfun (new_cfun); @@ -991,7 +996,7 @@ copy_cfg_body (inline_data *id) then associate this tree with the current region and add edges associated with this region. */ if (lookup_stmt_eh_region_fn ( - DECL_STRUCT_FUNCTION (id->callee), + id->callee_cfun, orig_stmt) <= 0 && get_eh_cur_region (caller_cfun) > 0) { @@ -2480,6 +2485,7 @@ clone_body (tree clone, tree fn, void *a memset (&id, 0, sizeof (id)); id.caller = clone; id.callee = fn; + id.callee_cfun = DECL_STRUCT_FUNCTION (fn); id.decl_map = (splay_tree)arg_map; /* Cloning is treated slightly differently from inlining. Set @@ -2507,6 +2513,7 @@ save_body (tree fn, tree *arg_copy, tree memset (&id, 0, sizeof (id)); id.callee = fn; + id.callee_cfun = DECL_STRUCT_FUNCTION (fn); id.caller = fn; id.node = cgraph_node (fn); id.saving_p = true;