Skip to content

Commit 19a647b

Browse files
author
John David Anglin
committed
Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
2024-02-11 John David Anglin <[email protected]> gcc/testsuite/ChangeLog: * gcc.c-torture/execute/ieee/cdivchkf.c: Use ilogb and __builtin_fmax instead of ilogbf and __builtin_fmaxf.
1 parent bbf05e3 commit 19a647b

File tree

1 file changed

+5
-4
lines changed
  • gcc/testsuite/gcc.c-torture/execute/ieee

1 file changed

+5
-4
lines changed

gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkf.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
extern void abort (void);
99
extern void exit (int);
1010

11-
extern int ilogbf (float);
11+
extern int ilogb (double);
1212
int match (float _Complex, float _Complex);
1313

1414
#define SMALL FLT_MIN
@@ -22,7 +22,8 @@ int match (float _Complex, float _Complex);
2222
int match (float _Complex c, float _Complex z)
2323
{
2424
float rz, iz, rc, ic;
25-
float rerr, ierr, rmax;
25+
float rerr, ierr;
26+
double rmax;
2627
int biterr;
2728
rz = __real__ z;
2829
iz = __imag__ z;
@@ -54,11 +55,11 @@ int match (float _Complex c, float _Complex z)
5455
{
5556
ierr = __builtin_fabsf (iz - ic) / SMALL;
5657
}
57-
rmax = __builtin_fmaxf(rerr, ierr);
58+
rmax = __builtin_fmax (rerr, ierr);
5859
biterr = 0;
5960
if ( rmax != 0.0)
6061
{
61-
biterr = ilogbf (rmax) + MAXBIT + 1;
62+
biterr = ilogb (rmax) + MAXBIT + 1;
6263
}
6364

6465
if (biterr >= ERRLIM)

0 commit comments

Comments
 (0)