1*2c5d2ea8SHan Shen@ RUN: not llvm-mc -triple armv7a-linux-gnueabihf %s -filetype=obj -o %t.o 2>&1 | FileCheck %s 257f661bdSPeter Smith 357f661bdSPeter Smith@ The relaxations should be applied using the subtarget from the fragment 457f661bdSPeter Smith@ containing the fixup and not the per module subtarget. 557f661bdSPeter Smith 657f661bdSPeter Smith .syntax unified 757f661bdSPeter Smith .thumb 857f661bdSPeter Smith @ Place a literal pool out of range of the 16-bit ldr but within 957f661bdSPeter Smith @ range of the 32-bit ldr.w 1057f661bdSPeter Smith .text 1157f661bdSPeter Smith @ Relaxation to ldr.w as target triple supports Thumb2 1257f661bdSPeter Smith ldr r0,=0x12345678 1357f661bdSPeter Smith .arch armv4t 1457f661bdSPeter Smith @ No relaxation as v4t does not support Thumb 1557f661bdSPeter Smith @ expect out of range error message 1657f661bdSPeter Smith ldr r0,=0x87654321 1757f661bdSPeter Smith .space 1024 1857f661bdSPeter Smith 1957f661bdSPeter Smith@ CHECK: error: out of range pc-relative fixup value 2057f661bdSPeter Smith@ CHECK-NEXT: ldr r0,=0x87654321 21