Skip to content

Commit c2d7ee7

Browse files
committed
[RISCV] Add a test with unknown argument of .attribute directive
1 parent 6a5da11 commit c2d7ee7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/test/MC/RISCV/invalid-attribute.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
## Negative tests:
2+
## - Unknown attribute name.
23
## - Feed integer value to string type attribute.
34
## - Feed string value to integer type attribute.
45
## - Invalid arch string.
56

67
# RUN: not llvm-mc %s -triple=riscv32 -filetype=asm 2>&1 | FileCheck %s
78
# RUN: not llvm-mc %s -triple=riscv64 -filetype=asm 2>&1 | FileCheck %s
89

10+
.attribute unknown, "unknown"
11+
# CHECK: [[@LINE-1]]:12: error: attribute name not recognised: unknown
12+
913
.attribute arch, "foo"
1014
# CHECK: [[@LINE-1]]:18: error: invalid arch name 'foo', string must begin with rv32{i,e,g} or rv64{i,e,g}
1115

0 commit comments

Comments
 (0)