Add a test for PR 27355 - where corrupt assembler .file directives could trigger...
authorNick Clifton <nickc@redhat.com>
Tue, 9 Feb 2021 10:51:40 +0000 (10:51 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 9 Feb 2021 10:51:40 +0000 (10:51 +0000)
PR 27355
* testsuite/gas/elf/pr27355.s: New test source file.
* testsuite/gas/elf/pr27355.d: New test control file.
* testsuite/gas/elf/pr27355.err: Expected errors from new test.
* testsuite/gas/elf/elf.exp: Run the new test.

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

index ed343afd2d877e18d249379ef0c16cc0055e191b..b4088cf0110065efae8661a97d33536321c037a8 100644 (file)
@@ -1,3 +1,11 @@
+2021-02-09  Nick Clifton  <nickc@redhat.com>
+
+       PR 27355
+       * testsuite/gas/elf/pr27355.s: New test source file.
+       * testsuite/gas/elf/pr27355.d: New test control file.
+       * testsuite/gas/elf/pr27355.err: Expected errors from new test.
+       * testsuite/gas/elf/elf.exp: Run the new test.
+
 2021-02-08  Mike Frysinger  <vapier@gentoo.org>
 
        * config/tc-tic54x (tic54x_mmregs): Rename to ...
index 4a695dfbaed44a51886d38587f5e8ca27bb24d8c..2917ea9fe5b3993631bd788420ed12400de6ae13 100644 (file)
@@ -304,6 +304,7 @@ if { [is_elf_format] } then {
     run_dump_test "bad-section-flag"
     run_dump_test "bad-size"
     run_dump_test "bad-group"
+    run_dump_test "pr27355"
 
     run_dump_test "syms"
 
diff --git a/gas/testsuite/gas/elf/pr27355.d b/gas/testsuite/gas/elf/pr27355.d
new file mode 100644 (file)
index 0000000..5906669
--- /dev/null
@@ -0,0 +1,3 @@
+#name: PR 27355
+#error_output: pr27355.err
+
diff --git a/gas/testsuite/gas/elf/pr27355.err b/gas/testsuite/gas/elf/pr27355.err
new file mode 100644 (file)
index 0000000..6f5e2ea
--- /dev/null
@@ -0,0 +1,5 @@
+.*pr27355.s: Assembler messages:
+.*pr27355.s:1: Error: bad expression
+.*pr27355.s:2: Error: bad or irreducible absolute expression
+.*pr27355.s:3: Error: bad or irreducible absolute expression
+.*pr27355.s:3: Error: missing string
diff --git a/gas/testsuite/gas/elf/pr27355.s b/gas/testsuite/gas/elf/pr27355.s
new file mode 100644 (file)
index 0000000..e7ddb34
--- /dev/null
@@ -0,0 +1,4 @@
+       .file   <"input_test.c"
+       .file   .string "%d\n""input_test.c"
+       .file   not reached
+