From 5a34af783af0043a094460492c1f65b27452a264 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 3 Mar 2011 06:18:55 +0000 Subject: [PATCH] Don't crash calling make with NaN or Infinity. From-SVN: r170644 --- gcc/go/gofrontend/types.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2