Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-ml / struct_errors.asm
blob44bbecfd56ec5e7b10e98c91e704a75f1dfc5f50
1 ; RUN: not llvm-ml -filetype=s %s /Fo /dev/null 2>&1 | FileCheck %s --dump-input=always
3 .data
4 int_test STRUCT
5 int_arr DWORD ?, ?
6 int_scalar DWORD ?
7 int_test ENDS
9 t1 int_test <<1,2,3>>
10 ; CHECK: error: Initializer too long for field; expected at most 2 elements, got 3
12 t2 int_test <4>
13 ; CHECK: error: Cannot initialize array field with scalar value
15 t3 int_test <,<5,6>>
16 ; CHECK: error: Cannot initialize scalar field with array value
18 real_test STRUCT
19 real_arr REAL4 ?, ?, ?
20 real_scalar REAL4 ?
21 real_test ENDS
23 t4 real_test <<1.0,0.0,-1.0,-2.0>>
24 ; CHECK: error: Initializer too long for field; expected at most 3 elements, got 4
26 t5 real_test <2.0>
27 ; CHECK: error: Cannot initialize array field with scalar value
29 t6 real_test <,<2.0,-2.0>>
30 ; CHECK: error: Cannot initialize scalar field with array value
32 inner_struct STRUCT
33 a BYTE ?
34 inner_struct ENDS
36 struct_test STRUCT
37 struct_arr inner_struct 4 DUP (?)
38 struct_scalar inner_struct ?
39 struct_test ENDS
41 t7 struct_test <<<>, <>, <>, <>, <>>>
42 ; CHECK: error: Initializer too long for field; expected at most 4 elements, got 5
44 t8 struct_test <,<<>, <>>>
45 ; CHECK: error: 'inner_struct' initializer initializes too many fields
47 t9 STRUCT 3
48 ; CHECK: error: alignment must be a power of two; was 3
49 t9 ENDS
51 t10 STRUCT 1, X
52 ; CHECK: error: Unrecognized qualifier for 'STRUCT' directive; expected none or NONUNIQUE
53 t10 ENDS
55 t11 STRUCT
56 different_struct ENDS
57 ; CHECK: error: mismatched name in ENDS directive; expected 't11'