From ce5f07f33c5ee660709cc7a6bc5101f0e25da757 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 21 Jan 2014 20:39:11 +0000 Subject: Forgot to add testcase for r198590 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199765 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/COFF/bad-expr.s | 7 +++++++ test/MC/ELF/bad-expr.s | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/MC/COFF/bad-expr.s create mode 100644 test/MC/ELF/bad-expr.s (limited to 'test') 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 -- cgit v1.2.3