Add a testcase for PR gas/12519.
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 25 Feb 2011 17:00:30 +0000 (17:00 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 25 Feb 2011 17:00:30 +0000 (17:00 +0000)
2011-02-25  H.J. Lu  <hongjiu.lu@intel.com>

PR gas/12519
* gas/elf/bad-size.d: New.
* gas/elf/bad-size.err: Likewise.
* gas/elf/bad-size.s: Likewise.

* gas/elf/elf.exp: Run bad-size.

gas/testsuite/ChangeLog
gas/testsuite/gas/elf/bad-size.d [new file with mode: 0644]
gas/testsuite/gas/elf/bad-size.err [new file with mode: 0644]
gas/testsuite/gas/elf/bad-size.s [new file with mode: 0644]
gas/testsuite/gas/elf/elf.exp

index 50c23da540763a227047a1ca4dc97e6b0bd4eea9..4bb775d6aeea3f69d864bf6b38b5676e6fdf4bec 100644 (file)
@@ -1,3 +1,12 @@
+2011-02-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/12519
+       * gas/elf/bad-size.d: New.
+       * gas/elf/bad-size.err: Likewise.
+       * gas/elf/bad-size.s: Likewise.
+
+       * gas/elf/elf.exp: Run bad-size.
+
 2011-02-13  Mike Frysinger  <vapier@gentoo.org>
 
        * gas/bfin/arithmetic.d, gas/bfin/parallel.d: Change A0 to A1.
diff --git a/gas/testsuite/gas/elf/bad-size.d b/gas/testsuite/gas/elf/bad-size.d
new file mode 100644 (file)
index 0000000..a313293
--- /dev/null
@@ -0,0 +1,2 @@
+#name: Check bad size directive
+#error-output: bad-size.err
diff --git a/gas/testsuite/gas/elf/bad-size.err b/gas/testsuite/gas/elf/bad-size.err
new file mode 100644 (file)
index 0000000..5e01ef2
--- /dev/null
@@ -0,0 +1,2 @@
+.*bad-size\.s: Assembler messages:
+.*bad-size\.s:6: Error: .*
diff --git a/gas/testsuite/gas/elf/bad-size.s b/gas/testsuite/gas/elf/bad-size.s
new file mode 100644 (file)
index 0000000..c982779
--- /dev/null
@@ -0,0 +1,6 @@
+       .text
+_test_nop:
+       .byte 0
+       .section .text.entry.continue, "xa"
+       .byte 0
+       .size _test_nop, .-_test_nop
index f21d838e3633aa1abb240311b432c0f7d7b85414..8bfeb95e216829aed521821fa53ff55674a7f342 100644 (file)
@@ -182,4 +182,5 @@ if { ([istarget "*-*-*elf*"]
     run_dump_test "dwarf2-3"
     run_dump_test "dwarf2-4"
     run_dump_test "bad-section-flag"
+    run_dump_test "bad-size"
 }