summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/RISCV/pcrel-lo12-invalid.s
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/MC/RISCV/pcrel-lo12-invalid.s')
-rw-r--r--llvm/test/MC/RISCV/pcrel-lo12-invalid.s5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/MC/RISCV/pcrel-lo12-invalid.s b/llvm/test/MC/RISCV/pcrel-lo12-invalid.s
new file mode 100644
index 00000000000..7cf2494ad8e
--- /dev/null
+++ b/llvm/test/MC/RISCV/pcrel-lo12-invalid.s
@@ -0,0 +1,5 @@
+# RUN: not llvm-mc -triple riscv32 -mattr=-relax -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
+# RUN: not llvm-mc -triple riscv32 -mattr=+relax -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
+
+1:
+ addi a0, a0, %pcrel_lo(1b) # CHECK: :[[@LINE]]:3: error: could not find corresponding %pcrel_hi
OpenPOWER on IntegriCloud