aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index d8abe03..259a348 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2805,7 +2805,9 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency_scale,
maybe_move_debug_stmts_to_successors (id, (basic_block) bb->aux);
/* Update call edge destinations. This can not be done before loop
info is updated, because we may split basic blocks. */
- if (id->transform_call_graph_edges == CB_CGE_DUPLICATE)
+ if (id->transform_call_graph_edges == CB_CGE_DUPLICATE
+ && bb->index != ENTRY_BLOCK
+ && bb->index != EXIT_BLOCK)
redirect_all_calls (id, (basic_block)bb->aux);
((basic_block)bb->aux)->aux = NULL;
bb->aux = NULL;