Add a test for linker ASSERT.
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 10 Jan 2011 14:37:40 +0000 (14:37 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 10 Jan 2011 14:37:40 +0000 (14: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 0910af2b24177a88ce6cfb40615a4abbb04c6dee..3fad41436b0cd60b6bf32bea58067cc0d5876102 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 1de900198727982f729577de76e7e485583f7fa1..b4169ac66703f79635e85b91becc50a973f6034e 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");