diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2006-11-16 03:50:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2006-11-15 19:50:16 -0800 |
commit | db21bbf90c02ca0a342e7fd9acdc778b2e758692 (patch) | |
tree | f2a0568805fd42d2791c79a11fa29f7364f5b42c /gcc/real.c | |
parent | e25a0da328d0e998674c670724d5fb361f81ebae (diff) | |
download | gcc-db21bbf90c02ca0a342e7fd9acdc778b2e758692.zip gcc-db21bbf90c02ca0a342e7fd9acdc778b2e758692.tar.gz gcc-db21bbf90c02ca0a342e7fd9acdc778b2e758692.tar.bz2 |
re PR middle-end/29862 (Calling a function with gcc_assert)
2006-11-15 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/29862
* real.c (mpfr_from_real): Call mpfr_set_str before gcc_assert.
From-SVN: r118881
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4930,11 +4930,13 @@ mpfr_from_real (mpfr_ptr m, const REAL_VALUE_TYPE *r) { /* We use a string as an intermediate type. */ char buf[128]; + int ret; real_to_hexadecimal (buf, r, sizeof (buf), 0, 1); /* mpfr_set_str() parses hexadecimal floats from strings in the same format that GCC will output them. Nothing extra is needed. */ - gcc_assert (mpfr_set_str (m, buf, 16, GMP_RNDN) == 0); + ret = mpfr_set_str (m, buf, 16, GMP_RNDN); + gcc_assert (ret == 0); } /* Convert from MPFR to REAL_VALUE_TYPE. */ |