aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-m68hc11/bug-1417.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-m68hc11/bug-1417.s')
-rw-r--r--ld/testsuite/ld-m68hc11/bug-1417.s21
1 files changed, 21 insertions, 0 deletions
diff --git a/ld/testsuite/ld-m68hc11/bug-1417.s b/ld/testsuite/ld-m68hc11/bug-1417.s
new file mode 100644
index 0000000..2b3e6a1
--- /dev/null
+++ b/ld/testsuite/ld-m68hc11/bug-1417.s
@@ -0,0 +1,21 @@
+;;; Bug #1417: Branch wrong after linker relaxation
+;;; http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1417&group_id=2424
+;;;
+ .sect .text
+ .globl _start
+_start:
+ tst table
+ bne L1 ; Branch was adjusted but it must not
+ jsr foo
+L1:
+ .relax L2
+ ldx #table ; Instruction removed
+ bset 0,x #4 ; Changed to bset *table #4
+L2:
+ rts
+foo:
+ rts
+
+ .sect .page0
+ .globl table
+table: .long 0