From: Ian Lance Taylor Date: Thu, 3 Mar 2011 06:18:55 +0000 (+0000) Subject: Don't crash calling make with NaN or Infinity. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a34af783af0043a094460492c1f65b27452a264;p=gcc.git Don't crash calling make with NaN or Infinity. From-SVN: r170644 --- diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 04b0bec7ac0..27104081df4 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -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);