aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfglayout.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-03-22 13:29:29 +0000
committerJakub Jelinek <jakub@redhat.com>2005-03-22 13:29:29 +0000
commit227c56ae36af43b34bdee4c81149f39ea2b8820d (patch)
tree27cfa1f3413445ef3163b5d474ce0e9ab308b803 /gcc/cfglayout.c
parentbf712b4dac63bdfd40fef1eb844c76e833aca35f (diff)
PR target/20561
* cfglayout.c (reemit_insn_block_notes): Don't put block notes in between jump table and its label. * final.c (shorten_branches): Handle notes in between ADDR_VEC resp. ADDR_DIFF_VEC and the label preceeding it. (final_scan_insn): Likewise. Ensure ADDR_VEC resp. ADDR_DIFF_VEC is emitted in the right section. * gcc.dg/20050321-2.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@96867 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r--gcc/cfglayout.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 981bcd9e74b..655c9a1b397 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -523,6 +523,12 @@ reemit_insn_block_notes (void)
{
tree this_block;
+ /* Avoid putting scope notes between jump table and its label. */
+ if (JUMP_P (insn)
+ && (GET_CODE (PATTERN (insn)) == ADDR_VEC
+ || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC))
+ continue;
+
this_block = insn_scope (insn);
/* For sequences compute scope resulting from merging all scopes
of instructions nested inside. */