diff --git a/llvm/test/MC/COFF/bad-expr.s b/llvm/test/MC/COFF/bad-expr.s new file mode 100644 index 000000000000..ecbdd415c3a6 --- /dev/null +++ b/llvm/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/llvm/test/MC/ELF/bad-expr.s b/llvm/test/MC/ELF/bad-expr.s new file mode 100644 index 000000000000..1cad919fee3c --- /dev/null +++ b/llvm/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