xref: /aosp_15_r20/external/llvm/test/MC/AsmParser/if-diagnostics.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -triple i386 %s -o /dev/null 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker.if
4*9880d681SAndroid Build Coastguard Worker.endif
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker// CHECK: error: unknown token in expression
7*9880d681SAndroid Build Coastguard Worker// CHECK: .if
8*9880d681SAndroid Build Coastguard Worker// CHECK:   ^
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker.ifeq 0, 3
11*9880d681SAndroid Build Coastguard Worker.endif
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker// CHECK:error: unexpected token in '.if' directive
14*9880d681SAndroid Build Coastguard Worker// CHECK: .ifeq 0, 3
15*9880d681SAndroid Build Coastguard Worker// CHECK:        ^
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker.iflt "string1"
18*9880d681SAndroid Build Coastguard Worker.endif
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker// CHECK: error: expected absolute expression
21*9880d681SAndroid Build Coastguard Worker// CHECK: .iflt "string1"
22*9880d681SAndroid Build Coastguard Worker// CHECK:       ^
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker.ifge test
25*9880d681SAndroid Build Coastguard Worker.endif
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker// CHECK: error: expected absolute expression
28*9880d681SAndroid Build Coastguard Worker// CHECK: .ifge test
29*9880d681SAndroid Build Coastguard Worker// CHECK:       ^
30