Index: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp =================================================================== --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -363,7 +363,8 @@ unsigned Kind = Fixup.getKind(); switch (Kind) { default: - llvm_unreachable("Unknown fixup kind!"); + if (Ctx) Ctx->reportError(Fixup.getLoc(), "bad relocation fixup type"); + return 0; case FK_Data_1: case FK_Data_2: case FK_Data_4: Index: llvm/trunk/test/MC/ARM/quad-relocation.s =================================================================== --- llvm/trunk/test/MC/ARM/quad-relocation.s +++ llvm/trunk/test/MC/ARM/quad-relocation.s @@ -0,0 +1,9 @@ +@ RUN: not llvm-mc -triple arm-arm-none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s + + .align 3 +symbol: + .quad(symbol) + +@ CHECK: error: bad relocation fixup type +@ CHECK-NEXT: .quad(symbol) +@ CHECK-NEXT: ^