Don't crash calling make with NaN or Infinity.

From-SVN: r170644
This commit is contained in:
Ian Lance Taylor 2011-03-03 06:18:55 +00:00
parent eba4ad892b
commit 5a34af783a
1 changed files with 1 additions and 1 deletions

View File

@ -769,7 +769,7 @@ Type::check_int_value(Expression* e, const char* errmsg,
mpfr_init(fval);
Type* dummy;
if (e->float_constant_value(fval, &dummy))
if (e->float_constant_value(fval, &dummy) && mpfr_integer_p(fval))
{
mpz_t ival;
mpz_init(ival);