[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / test / MC / WebAssembly / bad-fixup-expr.s
blob3bd7e6e2f06b0d0bb52cc96671868640fddfed65
1 // RUN: not llvm-mc -filetype=obj -triple wasm32 %s -o /dev/null 2>&1 | FileCheck %s
3 .section .data.foo,"",@
4 foo:
5 .int8 1
6 .size foo, 1
7 foo_other:
8 .int8 1
9 .size foo_other, 1
11 .section .data.bar,"",@
12 bar:
13 .int8 1
14 .size bar, 1
16 .text
17 .section .text.main,"",@
18 main:
19 .functype main () -> (i32)
20 // Expressions involving symbols within the same sections can be evaluated
21 // prior to writing the object file.
22 // CHECK-NOT: foo
23 i32.const foo-foo_other+2
24 i32.const foo_other-foo-10
26 // CHECK: 'bar': unsupported subtraction expression used in relocation
27 i32.const foo-bar
28 // CHECK: 'undef_baz': unsupported subtraction expression used in relocation
29 i32.const foo-undef_baz
30 // CHECK: 'foo': unsupported subtraction expression used in relocation
31 i32.const undef_baz-foo
32 end_function