[NFC][analyzer][docs] Crosslink MallocChecker's ownership attributes (#121939)
[llvm-project.git] / llvm / test / MC / RISCV / option-invalid.s
blob7f6de5f38c5288c6643f19e6edc38400172370c6
1 # RUN: not llvm-mc -triple riscv32 < %s 2>&1 \
2 # RUN: | FileCheck --implicit-check-not=error: %s
4 # CHECK: :[[#@LINE+1]]:8: error: expected identifier
5 .option
7 # CHECK: :[[#@LINE+1]]:9: error: expected identifier
8 .option 123
10 # CHECK: :[[#@LINE+1]]:9: error: expected identifier
11 .option "str"
13 # CHECK: :[[#@LINE+1]]:13: error: expected newline
14 .option rvc foo
16 # CHECK: :[[#@LINE+1]]:23: error: unexpected token, expected + or -
17 .option arch, +f, +d, rv32ifd, -d
19 # CHECK: :[[#@LINE+1]]:22: error: expected newline
20 .option arch, rv32ifd, +f, +d
22 # CHECK: :[[#@LINE+1]]:16: error: unexpected token, expected identifier
23 .option arch, +"c"
25 # CHECK: :[[#@LINE+1]]:16: error: unknown extension feature
26 .option arch, +x
28 # CHECK: :[[#@LINE+1]]:16: error: unknown extension feature
29 .option arch, +relax
31 # CHECK: :[[#@LINE+1]]:16: error: unexpected token, expected identifier
32 .option arch, +
34 # CHECK: :[[#@LINE+1]]:18: error: expected comma
35 .option arch, +c foo
37 # CHECK: :[[#@LINE+1]]:16: error: extension version number parsing not currently implemented
38 .option arch, +c2p0
40 .option arch, +d
41 # CHECK: :[[#@LINE+1]]:16: error: can't disable f extension; d extension requires f extension
42 .option arch, -f
44 # CHECK: :[[#@LINE+1]]:16: error: can't disable zicsr extension; f extension requires zicsr extension
45 .option arch, -zicsr
47 # CHECK: :[[#@LINE+1]]:20: error: 'f' and 'zfinx' extensions are incompatible
48 .option arch, +f, +zfinx
50 ## Make sure the above error isn't sticky
51 .option arch, +f
53 # CHECK: :[[#@LINE+1]]:13: error: expected newline
54 .option rvc foo
56 # CHECK: :[[#@LINE+1]]:12: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax'
57 .option bar
59 # CHECK: :[[#@LINE+1]]:12: error: .option pop with no .option push
60 .option pop
62 # CHECK: :[[#@LINE+1]]:14: error: expected newline
63 .option push 123
65 # CHECK: :[[#@LINE+1]]:13: error: expected newline
66 .option pop 123
68 # CHECK: :[[#@LINE+1]]:15: error: bad arch string switching from rv32 to rv64
69 .option arch, rv64gc