diff options
author | Richard Henderson <rth@redhat.com> | 2003-04-22 16:17:46 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-04-22 16:17:46 -0700 |
commit | 4da2eb6b9026e71f167204bc7ced622f44c70a1e (patch) | |
tree | 61fac5e9044077ae9018c6ffa6b7ab8c07fde408 /gcc/cfgrtl.c | |
parent | c1238896d34055a41d31f4e5b6a9678759eb8500 (diff) | |
download | gcc-4da2eb6b9026e71f167204bc7ced622f44c70a1e.zip gcc-4da2eb6b9026e71f167204bc7ced622f44c70a1e.tar.gz gcc-4da2eb6b9026e71f167204bc7ced622f44c70a1e.tar.bz2 |
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
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) |