llvm-mirror/test/MC/PowerPC/pr24686.s
Bill Schmidt b8e5332e87 [PPC] Fix PR24686 by failing assembly for an invalid relocation
PR24686 identifies a problem where a relocation expression is invalid
when not all of the symbols in the expression can be locally
resolved.  This causes the compiler to request a PC-relative half16ds
relocation, which is nonsensical for PowerPC.  This patch recognizes
this situation and ensures we fail the assembly cleanly.

Test case provided by Anton Blanchard.

llvm-svn: 251027
2015-10-22 15:53:44 +00:00

8 lines
210 B
ArmAsm

# RUN: not llvm-mc -triple=powerpc64le-unknown-linux-gnu -filetype=obj %s \
# RUN: 2>&1 | FileCheck %s
_stext:
ld %r5, p_end - _stext(%r5)
# CHECK: LLVM ERROR: Invalid PC-relative half16ds relocation