From f3aa805470a5b70f3abb43f8e5340687a405c6f6 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 30 Jun 2012 12:35:52 +0000 Subject: [PATCH] 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. --- gas/testsuite/ChangeLog | 12 ++++++++++++ gas/testsuite/gas/elf/common1.d | 2 ++ gas/testsuite/gas/elf/common1.l | 2 ++ gas/testsuite/gas/elf/common1.s | 2 ++ gas/testsuite/gas/elf/common2.d | 2 ++ gas/testsuite/gas/elf/common2.l | 2 ++ gas/testsuite/gas/elf/common2.s | 2 ++ gas/testsuite/gas/elf/elf.exp | 3 +++ 8 files changed, 27 insertions(+) create mode 100644 gas/testsuite/gas/elf/common1.d create mode 100644 gas/testsuite/gas/elf/common1.l create mode 100644 gas/testsuite/gas/elf/common1.s create mode 100644 gas/testsuite/gas/elf/common2.d create mode 100644 gas/testsuite/gas/elf/common2.l create mode 100644 gas/testsuite/gas/elf/common2.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index d968a8e..8e99af7 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2012-06-30 H.J. Lu + + 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 * 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 0000000..26175f2 --- /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 0000000..b549b9a --- /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 0000000..61c9efe --- /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 0000000..70943b4 --- /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 0000000..b549b9a --- /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 0000000..076c7fa --- /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 b437730..7897788 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]] "" "" -- 2.7.4