Fix for ipa/PR64503
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Jan 2015 10:38:49 +0000 (10:38 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Jan 2015 10:38:49 +0000 (10:38 +0000)
PR ipa/64503
* sreal.c (sreal::dump): Change unsigned format to signed for
m_exp value.
(sreal::to_double): Replace exp2 with scalbln.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219378 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/sreal.c

index eb69b39..9cf712c 100644 (file)
@@ -1,5 +1,12 @@
 2015-01-09  Martin Liska  <mliska@suse.cz>
 
+       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  <mliska@suse.cz>
+
        * cgraphunit.c (cgraph_node::create_wrapper): Fix level of indentation.
        * ipa-icf.c (sem_function::equals_private): Add support for target and
        (sem_item_optimizer::merge_classes): Remove redundant function
index 82ebcb8..622fc2d 100644 (file)
@@ -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;
 }