summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-01-21 20:39:11 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-01-21 20:39:11 +0000
commitce5f07f33c5ee660709cc7a6bc5101f0e25da757 (patch)
tree8c26f4562f01d5e3382d583b0b680fc00ffd336a /test
parentda3446099d8e17d75f36fc78c88db1646469ddaf (diff)
downloadllvm-ce5f07f33c5ee660709cc7a6bc5101f0e25da757.tar.gz
llvm-ce5f07f33c5ee660709cc7a6bc5101f0e25da757.tar.bz2
llvm-ce5f07f33c5ee660709cc7a6bc5101f0e25da757.tar.xz
Forgot to add testcase for r198590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/COFF/bad-expr.s7
-rw-r--r--test/MC/ELF/bad-expr.s8
2 files changed, 15 insertions, 0 deletions
diff --git a/test/MC/COFF/bad-expr.s b/test/MC/COFF/bad-expr.s
new file mode 100644
index 0000000000..ecbdd415c3
--- /dev/null
+++ b/test/MC/COFF/bad-expr.s
@@ -0,0 +1,7 @@
+// RUN: not llvm-mc -filetype=obj -triple i386-pc-win32 %s 2>&1 | FileCheck %s
+
+// CHECK: symbol '__ImageBase' can not be undefined in a subtraction expression
+
+ .data
+_x:
+ .long _x-__ImageBase
diff --git a/test/MC/ELF/bad-expr.s b/test/MC/ELF/bad-expr.s
new file mode 100644
index 0000000000..1cad919fee
--- /dev/null
+++ b/test/MC/ELF/bad-expr.s
@@ -0,0 +1,8 @@
+// RUN: not llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o /dev/null 2>%t
+// RUN: FileCheck --input-file=%t %s
+
+// CHECK: symbol '__executable_start' can not be undefined in a subtraction expression
+
+ .data
+x:
+ .quad x-__executable_start