aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-11-28 23:39:19 +0000
committerHans-Peter Nilsson <hp@axis.com>2000-11-28 23:39:19 +0000
commitdc6e09d3637c9a29563b84bb8f6e242ac143c6b2 (patch)
tree156628e4ad91b34e06e9174e52c5d64c612fa676 /gas
parent99b222b4795bd3905fbe2a449c1d960c8d64fe32 (diff)
downloadgdb-dc6e09d3637c9a29563b84bb8f6e242ac143c6b2.zip
gdb-dc6e09d3637c9a29563b84bb8f6e242ac143c6b2.tar.gz
gdb-dc6e09d3637c9a29563b84bb8f6e242ac143c6b2.tar.bz2
* gas/sh/err.exp: New, framework for error-testing.
* gas/sh/err-1.s: New test.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/sh/err-1.s11
-rw-r--r--gas/testsuite/gas/sh/err.exp28
3 files changed, 44 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 4bb3ecc..1e3638e 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * gas/sh/err.exp: New, framework for error-testing.
+ * gas/sh/err-1.s: New test.
+
2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* gas/m68hc11/opers12.s: New test for movw operands.
diff --git a/gas/testsuite/gas/sh/err-1.s b/gas/testsuite/gas/sh/err-1.s
new file mode 100644
index 0000000..ecd1bcd
--- /dev/null
+++ b/gas/testsuite/gas/sh/err-1.s
@@ -0,0 +1,11 @@
+! { dg-do assemble }
+
+! Check that errors are emitted, with no crashes, when an external symbol
+! is referenced in a conditional or unconditional branch.
+start:
+ nop
+ bt externsym1 ! { dg-error "undefined symbol" }
+ nop
+ bra externsym2 ! { dg-error "undefined symbol" }
+ nop
+
diff --git a/gas/testsuite/gas/sh/err.exp b/gas/testsuite/gas/sh/err.exp
new file mode 100644
index 0000000..d012ad4
--- /dev/null
+++ b/gas/testsuite/gas/sh/err.exp
@@ -0,0 +1,28 @@
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# binutils@sources.redhat.com
+
+load_lib gas-dg.exp
+dg-init
+
+if [istarget sh-*-*] then {
+ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/warn-*.s]] "" ""
+ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s]] "" ""
+}
+
+dg-finish