xref: /aosp_15_r20/external/llvm/test/MC/ARM/error-location.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple armv7a--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker@ Note: These errors are not always emitted in the order in which the relevant
4*9880d681SAndroid Build Coastguard Worker@ source appears, this file is carefully ordered so that that is the case.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker  .text
7*9880d681SAndroid Build Coastguard Worker@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: symbol 'undef' can not be undefined in a subtraction expression
8*9880d681SAndroid Build Coastguard Worker  .word (0-undef)
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: expected relocatable expression
11*9880d681SAndroid Build Coastguard Worker  .word -undef
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: No relocation available to represent this relative expression
14*9880d681SAndroid Build Coastguard Worker  adr r0, #a-undef
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: Cannot represent a difference across sections
17*9880d681SAndroid Build Coastguard Worker  .word x_a - y_a
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker@ CHECK: <unknown>:0: error: expression could not be evaluated
20*9880d681SAndroid Build Coastguard Worker  .set v1, -undef
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker  .comm common, 4
23*9880d681SAndroid Build Coastguard Worker@ CHECK: <unknown>:0: error: Common symbol 'common' cannot be used in assignment expr
24*9880d681SAndroid Build Coastguard Worker  .set v3, common
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Worker@ CHECK: <unknown>:0: error: symbol 'undef' could not be evaluated in a subtraction expression
27*9880d681SAndroid Build Coastguard Worker  .set v2, a-undef
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Workerw:
32*9880d681SAndroid Build Coastguard Worker  .word 0
33*9880d681SAndroid Build Coastguard Worker  .weak w
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker  .section sec_x
37*9880d681SAndroid Build Coastguard Workerx_a:
38*9880d681SAndroid Build Coastguard Worker  .word 0
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Worker  .section sec_y
42*9880d681SAndroid Build Coastguard Workery_a:
43*9880d681SAndroid Build Coastguard Worker  .word 0
44