OSDN Git Service

Add a test for linker ASSERT.
authorhjl <hjl>
Mon, 10 Jan 2011 23:37:39 +0000 (23:37 +0000)
committerhjl <hjl>
Mon, 10 Jan 2011 23:37:39 +0000 (23:37 +0000)
2011-01-10  H.J. Lu  <hongjiu.lu@intel.com>

* ld-scripts/assert.exp: Run assert2.

* ld-scripts/assert2.d: New.
* ld-scripts/assert2.t: Likewise.

ld/testsuite/ChangeLog
ld/testsuite/ld-scripts/assert.exp
ld/testsuite/ld-scripts/assert2.d [new file with mode: 0644]
ld/testsuite/ld-scripts/assert2.t [new file with mode: 0644]

index 0910af2..3fad414 100644 (file)
@@ -1,3 +1,10 @@
+2011-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * ld-scripts/assert.exp: Run assert2.
+
+       * ld-scripts/assert2.d: New.
+       * ld-scripts/assert2.t: Likewise.
+
 2011-01-10  Nathan Sidwell  <nathan@codesourcery.com>
            Glauber de Oliveira Costa  <glommer@gmail.com>
 
index 1de9001..b4169ac 100644 (file)
@@ -32,3 +32,5 @@ if ![ld_simple_link $ld tmpdir/assert "-T $srcdir/$subdir/assert.t tmpdir/assert
 } else {
     pass $testname
 }
+
+run_dump_test "assert2"
diff --git a/ld/testsuite/ld-scripts/assert2.d b/ld/testsuite/ld-scripts/assert2.d
new file mode 100644 (file)
index 0000000..3b083ff
--- /dev/null
@@ -0,0 +1,3 @@
+# source: assert.s
+# ld: -T assert2.t
+# error: assert failed.
diff --git a/ld/testsuite/ld-scripts/assert2.t b/ld/testsuite/ld-scripts/assert2.t
new file mode 100644 (file)
index 0000000..f6a9822
--- /dev/null
@@ -0,0 +1 @@
+ASSERT(2 * 2 == 5, "assert failed");