From: Martin Liska Date: Fri, 9 Jan 2015 10:38:49 +0000 (+0100) Subject: Fix for ipa/PR64503 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce9401b43fd971f49db251a56f5a32c68de803a2;p=gcc.git Fix for ipa/PR64503 PR ipa/64503 * sreal.c (sreal::dump): Change unsigned format to signed for m_exp value. (sreal::to_double): Replace exp2 with scalbln. From-SVN: r219378 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb69b39cf36..9cf712c32ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-01-09 Martin Liska + + PR ipa/64503 + * sreal.c (sreal::dump): Change unsigned format to signed for + m_exp value. + (sreal::to_double): Replace exp2 with scalbln. + 2015-01-09 Martin Liska * cgraphunit.c (cgraph_node::create_wrapper): Fix level of indentation. diff --git a/gcc/sreal.c b/gcc/sreal.c index 82ebcb829d6..622fc2d2136 100644 --- a/gcc/sreal.c +++ b/gcc/sreal.c @@ -58,7 +58,7 @@ along with GCC; see the file COPYING3. If not see void sreal::dump (FILE *file) const { - fprintf (file, "(%" PRIu64 " * 2^%d)", m_sig, m_exp); + fprintf (file, "(%" PRIi64 " * 2^%d)", m_sig, m_exp); } DEBUG_FUNCTION void @@ -122,7 +122,7 @@ sreal::to_double () const { double val = m_sig; if (m_exp) - val *= exp2 (m_exp); + val = scalbln (val, m_exp); return val; }