diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-03 06:18:55 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-03 06:18:55 +0000 |
commit | 5a34af783af0043a094460492c1f65b27452a264 (patch) | |
tree | b2288d23de258d0329861e7d2e183136d98a9963 /gcc | |
parent | eba4ad892b1a8ff1f4a6372b42b099df5b6a1d6a (diff) | |
download | gcc-5a34af783af0043a094460492c1f65b27452a264.zip gcc-5a34af783af0043a094460492c1f65b27452a264.tar.gz gcc-5a34af783af0043a094460492c1f65b27452a264.tar.bz2 |
Don't crash calling make with NaN or Infinity.
From-SVN: r170644
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/types.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 04b0bec..2710408 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); |