From 4da2eb6b9026e71f167204bc7ced622f44c70a1e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 22 Apr 2003 16:17:46 -0700 Subject: re PR middle-end/8866 (Bug in switch statement code generation -- missing label) PR 8866 * rtl.h (MEM_NOTRAP_P): New. (MEM_COPY_ATTRIBUTES): Copy it. * rtlanal.c (may_trap_p): Check it. * expr.c (do_tablejump): Set it. * doc/rtl.texi (Flags): Document it. * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. From-SVN: r65967 --- gcc/cfgrtl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc/cfgrtl.c') diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 654d3e3..0ba32c5 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -740,12 +740,14 @@ try_redirect_by_replacing_jump (e, target) fprintf (rtl_dump_file, "Replacing insn %i by jump %i\n", INSN_UID (insn), INSN_UID (src->end)); - /* Remove the original jump. If INSN is a tablejump, the jump - table will be removed later, if it is no longer needed. */ + delete_insn_chain (kill_from, insn); + /* Recognize a tablejump that we are converting to a + simple jump and remove its associated CODE_LABEL + and ADDR_VEC or ADDR_DIFF_VEC. */ if (tablejump_p (insn, &label, &table)) - create_basic_block (label, table, src); + delete_insn_chain (label, table); barrier = next_nonnote_insn (src->end); if (!barrier || GET_CODE (barrier) != BARRIER) -- cgit v1.1