From ac0911a269178f134b0cfa9641f304ee1945f6e0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 5 Jan 2009 18:24:23 +0000 Subject: [PATCH] reject PR3281:crash10.ll with: llvm-as: crash10.ll:3:35: floating point constant does not have type 'ppc_fp128' "dumy" = fcmp ult ppc_fp128 "j",9209.4 ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61721 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/LLParser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 27dbf8871a6..c13737aae52 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1911,6 +1911,11 @@ bool LLParser::ConvertGlobalValIDToValue(const Type *Ty, ValID &ID, &Ignored); } V = ConstantFP::get(ID.APFloatVal); + + if (V->getType() != Ty) + return Error(ID.Loc, "floating point constant does not have type '" + + Ty->getDescription() + "'"); + return false; case ValID::t_Null: if (!isa(Ty)) -- 2.11.0