public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
@ 2024-02-11 21:44 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2024-02-11 21:44 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

Tested on hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu.
Committed to trunk.

Dave
---

Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux

2024-02-11  John David Anglin  <danglin@gcc.gnu.org>

gcc/testsuite/ChangeLog:

	* gcc.c-torture/execute/ieee/cdivchkf.c: Use ilogb and
	__builtin_fmax instead of ilogbf and __builtin_fmaxf.

diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c b/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c
index adf1ed91dc7..86ef69f8771 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c
@@ -8,7 +8,7 @@
 extern void abort (void);
 extern void exit (int);
 
-extern int ilogbf (float);
+extern int ilogb (double);
 int match (float _Complex, float _Complex);
 
 #define SMALL FLT_MIN
@@ -22,7 +22,8 @@ int match (float _Complex, float _Complex);
 int match (float _Complex c, float _Complex z)
 {
   float rz, iz, rc, ic;
-  float rerr, ierr, rmax;
+  float rerr, ierr;
+  double rmax;
   int biterr;
   rz = __real__ z;
   iz = __imag__ z;
@@ -54,11 +55,11 @@ int match (float _Complex c, float _Complex z)
     {
       ierr = __builtin_fabsf (iz - ic) / SMALL;
     }
-  rmax = __builtin_fmaxf(rerr, ierr);
+  rmax = __builtin_fmax (rerr, ierr);
   biterr = 0;
   if ( rmax != 0.0)      
     {
-      biterr = ilogbf (rmax) + MAXBIT + 1;
+      biterr = ilogb (rmax) + MAXBIT + 1;
     }
 
   if (biterr >= ERRLIM)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-11 21:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11 21:44 [committed] Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).