Add testcases for PR gas/14315
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 30 Jun 2012 12:35:52 +0000 (12:35 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 30 Jun 2012 12:35:52 +0000 (12:35 +0000)
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.

gas/testsuite/ChangeLog
gas/testsuite/gas/elf/common1.d [new file with mode: 0644]
gas/testsuite/gas/elf/common1.l [new file with mode: 0644]
gas/testsuite/gas/elf/common1.s [new file with mode: 0644]
gas/testsuite/gas/elf/common2.d [new file with mode: 0644]
gas/testsuite/gas/elf/common2.l [new file with mode: 0644]
gas/testsuite/gas/elf/common2.s [new file with mode: 0644]
gas/testsuite/gas/elf/elf.exp

index d968a8e15a17e45b6ee09b590436dea35cd743d7..8e99af7fa5e280fbf7dc19649d3a412ad7668b71 100644 (file)
@@ -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 (file)
index 0000000..26175f2
--- /dev/null
@@ -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 (file)
index 0000000..b549b9a
--- /dev/null
@@ -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 (file)
index 0000000..61c9efe
--- /dev/null
@@ -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 (file)
index 0000000..70943b4
--- /dev/null
@@ -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 (file)
index 0000000..b549b9a
--- /dev/null
@@ -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 (file)
index 0000000..076c7fa
--- /dev/null
@@ -0,0 +1,2 @@
+       .comm foobar,30
+       .weak foobar
index b437730ca980b0c8f514a47058da118913a5e75f..789778858b5cf79bc4b8734ecaa56a9b5d786bfa 100644 (file)
@@ -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]] "" ""
This page took 0.031398 seconds and 4 git commands to generate.