diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index 8ecfa3544a9..35de71497a9 100644 --- a/lib/Support/APFloat.cpp +++ b/lib/Support/APFloat.cpp @@ -1678,6 +1678,7 @@ APFloat::convert(const fltSemantics &toSemantics, opStatus fs; assertArithmeticOK(*semantics); + assertArithmeticOK(toSemantics); lostFraction = lfExactlyZero; newPartCount = partCountForBits(toSemantics.precision + 1); oldPartCount = partCount();