From 6ee3c8e4125518898c36b97105cb5f12d8ef3132 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 30 Dec 2001 13:20:43 +0100 Subject: cfgrtl.c (try_redirect_by_replacing_jump): Allow redirect_jump to fail if target is EXIT_BLOCK_PTR, die otherwise. * cfgrtl.c (try_redirect_by_replacing_jump): Allow redirect_jump to fail if target is EXIT_BLOCK_PTR, die otherwise. (redirect_edge_and_branch): Likewise. * cfgcleanup.c (try_forward_edge): Don't force jump redirecting if target is EXIT_BLOCK_PTR. * gcc.c-torture/compile/20011229-2.c: New test. From-SVN: r48399 --- gcc/cfgcleanup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/cfgcleanup.c') diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 9933def..9803032 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -440,7 +440,8 @@ try_forward_edges (mode, b) int edge_probability = e->probability; int edge_frequency; - if (threaded) + /* Don't force if target is exit block. */ + if (threaded && target != EXIT_BLOCK_PTR) { notice_new_block (redirect_edge_and_branch_force (e, target)); if (rtl_dump_file) -- cgit v1.1