summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-06-30 12:35:52 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-06-30 12:35:52 +0000
commitf3aa805470a5b70f3abb43f8e5340687a405c6f6 (patch)
treeb939729f65f3d3aa7732eaa68b23882bb9d807fc
parente95a6b1c3cc4796e692c01f88bec27da0f6a093f (diff)
downloadbinutils-gdb-f3aa805470a5b70f3abb43f8e5340687a405c6f6.tar.gz
Add testcases for PR gas/14315
PR gas/14315 * gas/elf/common1.d: New file. * gas/elf/common1.l: Likewise. * gas/elf/common1.s: Likewise. * gas/elf/common2.d: Likewise. * gas/elf/common2.l: Likewise. * gas/elf/common2.s: Likewise. * gas/elf/elf.exp: Run common1 and common2.
-rw-r--r--gas/testsuite/ChangeLog12
-rw-r--r--gas/testsuite/gas/elf/common1.d2
-rw-r--r--gas/testsuite/gas/elf/common1.l2
-rw-r--r--gas/testsuite/gas/elf/common1.s2
-rw-r--r--gas/testsuite/gas/elf/common2.d2
-rw-r--r--gas/testsuite/gas/elf/common2.l2
-rw-r--r--gas/testsuite/gas/elf/common2.s2
-rw-r--r--gas/testsuite/gas/elf/elf.exp3
8 files changed, 27 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index d968a8e15a1..8e99af7fa5e 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2012-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/14315
+ * gas/elf/common1.d: New file.
+ * gas/elf/common1.l: Likewise.
+ * gas/elf/common1.s: Likewise.
+ * gas/elf/common2.d: Likewise.
+ * gas/elf/common2.l: Likewise.
+ * gas/elf/common2.s: Likewise.
+
+ * gas/elf/elf.exp: Run common1 and common2.
+
2012-06-29 Alan Modra <amodra@gmail.com>
* gas/lns/lns.exp (lns-common-1): Add crx to alt target list.
diff --git a/gas/testsuite/gas/elf/common1.d b/gas/testsuite/gas/elf/common1.d
new file mode 100644
index 00000000000..26175f20d14
--- /dev/null
+++ b/gas/testsuite/gas/elf/common1.d
@@ -0,0 +1,2 @@
+#name: weak and common directives
+#error-output: common1.l
diff --git a/gas/testsuite/gas/elf/common1.l b/gas/testsuite/gas/elf/common1.l
new file mode 100644
index 00000000000..b549b9ad7c0
--- /dev/null
+++ b/gas/testsuite/gas/elf/common1.l
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*: Error: symbol `foobar' can not be both weak and common
diff --git a/gas/testsuite/gas/elf/common1.s b/gas/testsuite/gas/elf/common1.s
new file mode 100644
index 00000000000..61c9efe973a
--- /dev/null
+++ b/gas/testsuite/gas/elf/common1.s
@@ -0,0 +1,2 @@
+ .weak foobar
+ .comm foobar,30
diff --git a/gas/testsuite/gas/elf/common2.d b/gas/testsuite/gas/elf/common2.d
new file mode 100644
index 00000000000..70943b47472
--- /dev/null
+++ b/gas/testsuite/gas/elf/common2.d
@@ -0,0 +1,2 @@
+#name: common and weak directives
+#error-output: common2.l
diff --git a/gas/testsuite/gas/elf/common2.l b/gas/testsuite/gas/elf/common2.l
new file mode 100644
index 00000000000..b549b9ad7c0
--- /dev/null
+++ b/gas/testsuite/gas/elf/common2.l
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*: Error: symbol `foobar' can not be both weak and common
diff --git a/gas/testsuite/gas/elf/common2.s b/gas/testsuite/gas/elf/common2.s
new file mode 100644
index 00000000000..076c7fa068e
--- /dev/null
+++ b/gas/testsuite/gas/elf/common2.s
@@ -0,0 +1,2 @@
+ .comm foobar,30
+ .weak foobar
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index b437730ca98..789778858b5 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -186,6 +186,9 @@ if { [is_elf_format] } then {
run_dump_test "syms"
+ run_dump_test "common1"
+ run_dump_test "common2"
+
load_lib gas-dg.exp
dg-init
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s $srcdir/$subdir/warn-*.s]] "" ""