aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s')
-rw-r--r--test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s b/test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s
new file mode 100644
index 0000000..3aefd87
--- /dev/null
+++ b/test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s
@@ -0,0 +1,6 @@
+// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - 2> %t.err > %t
+// RUN: FileCheck --check-prefix=CHECK-ERROR < %t.err %s
+
+_Z:
+.long (_a+4)-_Z
+// CHECK-ERROR: error: unsupported relocation with subtraction expression, symbol '_a' can not be undefined in a subtraction expression