summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-03-06 22:33:42 -0800
committerTobias Hieta <tobias@hieta.se>2023-03-28 08:54:58 +0200
commitee1493c713d69bcc9329923c132f8befd79dcc65 (patch)
tree8282a3beeb1eeccd1888ce24a25059c953bd5f70
parent4f243f13785931667440be264ab96c55159dbfd2 (diff)
downloadllvm-ee1493c713d69bcc9329923c132f8befd79dcc65.tar.gz
[test] Improve MC/RISCV/riscv64-64b-pcrel.s to demonstrate regression due to D132262
(cherry picked from commit feb3432a4e9448cee425e610af5b62567a298e2c)
-rw-r--r--llvm/test/MC/RISCV/riscv64-64b-pcrel.s9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/MC/RISCV/riscv64-64b-pcrel.s b/llvm/test/MC/RISCV/riscv64-64b-pcrel.s
index 51df17a4447e..ebdacc0785c9 100644
--- a/llvm/test/MC/RISCV/riscv64-64b-pcrel.s
+++ b/llvm/test/MC/RISCV/riscv64-64b-pcrel.s
@@ -24,6 +24,15 @@
# CHECK-NEXT: }
# CHECK-NEXT: ]
+.ifdef ERR
+.section .note,"a",@note; note:
+# ERROR: :[[#@LINE+1]]:7: error: unsupported relocation type
+.quad extern-note
+.section .rodata,"a",@progbits; rodata:
+# ERROR: :[[#@LINE+1]]:7: error: unsupported relocation type
+.quad extern-rodata
+.endif
+
.section .alloc_w,"aw",@progbits; w:
.quad extern-w
.quad w-extern