Add a testcase for PR gas/19498
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 5 Apr 2016 03:45:30 +0000 (20:45 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 5 Apr 2016 03:45:30 +0000 (20:45 -0700)
PR gas/19498
* testsuite/gas/i386/i386.exp: Run pr19498.
* testsuite/gas/i386/pr19498.d: New file.
* testsuite/gas/i386/pr19498.s: Likewise.

gas/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/pr19498.d [new file with mode: 0644]
gas/testsuite/gas/i386/pr19498.s [new file with mode: 0644]

index 46ce10d2964289f65c682aede0066aa572112af0..7c1c6a009ea1cc53252da9c28275f34bfba90da8 100644 (file)
@@ -1,3 +1,10 @@
+2016-04-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/19498
+       * testsuite/gas/i386/i386.exp: Run pr19498.
+       * testsuite/gas/i386/pr19498.d: New file.
+       * testsuite/gas/i386/pr19498.s: Likewise.
+
 2016-04-04  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * config/tc-arc.h: Include 'opcode/arc.h'.
index f1e7611efb24c3bf83aff9f274c1e48f448a7a88..9c4fdeabb84ef2fe75873a14947cee43679bfa9a 100644 (file)
@@ -443,6 +443,7 @@ if [expr [istarget "i*86-*-*"] || [istarget "x86_64-*-*"]] then {
     run_list_test "reg-bad" ""
     run_list_test "space1" "-al"
     run_dump_test rept
+    run_dump_test pr19498
     if [is_elf_format] then {
        run_list_test_stdin "list-1" "-al"
        run_list_test_stdin "list-2" "-al"
diff --git a/gas/testsuite/gas/i386/pr19498.d b/gas/testsuite/gas/i386/pr19498.d
new file mode 100644 (file)
index 0000000..35e86ca
--- /dev/null
@@ -0,0 +1,13 @@
+#objdump: -dwr
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <callmefirst>:
+[      ]*[a-f0-9]+:    90                      nop
+
+0+1 <callmesecond>:
+[      ]*[a-f0-9]+:    eb fd                   jmp    0 <callmefirst>
+#pass
diff --git a/gas/testsuite/gas/i386/pr19498.s b/gas/testsuite/gas/i386/pr19498.s
new file mode 100644 (file)
index 0000000..0cf4079
--- /dev/null
@@ -0,0 +1,8 @@
+       .text
+       .globl callmefirst
+callmefirst:
+       nop
+       .globl callmesecond
+callmesecond:
+       jmp     callmealias.lto_priv.0
+       .weakref callmealias.lto_priv.0,callmefirst