diff mbox

Fix for PR ipa/64278

Message ID 548B1DBC.5020205@suse.cz
State New
Headers show

Commit Message

Martin Liška Dec. 12, 2014, 4:54 p.m. UTC
Hello.

This is patch for PR ipa/64278, where I replace ambiguous std::abs with absu_hwi.

Patch can bootstrap on ppc64-linux and no new regression was seen.

Ready for thunk?

Thanks,
Martin

Comments

Richard Biener Dec. 13, 2014, 5:36 p.m. UTC | #1
On December 12, 2014 5:54:20 PM CET, "Martin Liška" <mliska@suse.cz> wrote:
>Hello.
>
>This is patch for PR ipa/64278, where I replace ambiguous std::abs with
>absu_hwi.
>
>Patch can bootstrap on ppc64-linux and no new regression was seen.
>
>Ready for thunk?

OK

Thanks,
Richard.

>Thanks,
>Martin
diff mbox

Patch

From 03a15009e5c9a9045669a4987588d8abf8cc67f1 Mon Sep 17 00:00:00 2001
From: mliska <mliska@suse.cz>
Date: Fri, 12 Dec 2014 16:42:57 +0100
Subject: [PATCH] Fix for PR ipa/64278.

gcc/ChangeLog:

2014-12-12  Martin Liska  <mliska@suse.cz>

	PR ipa/64278
	* sreal.c (sreal::operator*): Call to std::abs can be ambiguos and
	is replaced with absu_hwi.
---
 gcc/sreal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/sreal.c b/gcc/sreal.c
index bc3af23..0bbc729 100644
--- a/gcc/sreal.c
+++ b/gcc/sreal.c
@@ -251,7 +251,7 @@  sreal
 sreal::operator* (const sreal &other) const
 {
   sreal r;
-  if (std::abs (m_sig) < SREAL_MIN_SIG || std::abs (other.m_sig) < SREAL_MIN_SIG)
+  if (absu_hwi (m_sig) < SREAL_MIN_SIG || absu_hwi (other.m_sig) < SREAL_MIN_SIG)
     {
       r.m_sig = 0;
       r.m_exp = -SREAL_MAX_EXP;
-- 
2.1.2