xref: /aosp_15_r20/external/llvm/test/MC/AsmParser/directive_rept-diagnostics.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: not llvm-mc -triple i686-elf -filetype asm -o /dev/null %s 2>&1 \
2*9880d681SAndroid Build Coastguard Worker# RUN:   | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker	.data
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker	.global invalid_expression
7*9880d681SAndroid Build Coastguard Worker	.type invalid_expression,@object
8*9880d681SAndroid Build Coastguard Workerinvalid_expression:
9*9880d681SAndroid Build Coastguard Worker	.rept *
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker# CHECK: error: unknown token in expression
12*9880d681SAndroid Build Coastguard Worker# CHECK: 	.rept *
13*9880d681SAndroid Build Coastguard Worker# CHECK:              ^
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker	.global bad_token
16*9880d681SAndroid Build Coastguard Worker	.type bad_token,@object
17*9880d681SAndroid Build Coastguard Workerbad_token:
18*9880d681SAndroid Build Coastguard Worker	.rept bad_token
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker# CHECK: error: unexpected token in '.rept' directive
21*9880d681SAndroid Build Coastguard Worker# CHECK: 	.rept bad_token
22*9880d681SAndroid Build Coastguard Worker# CHECK:              ^
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker	.global negative
25*9880d681SAndroid Build Coastguard Worker	.type negative,@object
26*9880d681SAndroid Build Coastguard Workernegative:
27*9880d681SAndroid Build Coastguard Worker	.rept -32
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker# CHECK: error: Count is negative
30*9880d681SAndroid Build Coastguard Worker# CHECK: 	.rept -32
31*9880d681SAndroid Build Coastguard Worker# CHECK:              ^
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Worker	.global trailer
34*9880d681SAndroid Build Coastguard Worker	.type trailer,@object
35*9880d681SAndroid Build Coastguard Workertrailer:
36*9880d681SAndroid Build Coastguard Worker	.rep 0 trailer
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Worker# CHECK: error: unexpected token in '.rep' directive
39*9880d681SAndroid Build Coastguard Worker# CHECK: 	.rep 0 trailer
40*9880d681SAndroid Build Coastguard Worker# CHECK:               ^
41*9880d681SAndroid Build Coastguard Worker
42