summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-21 21:39:33 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-21 21:39:33 +0000
commit65ce19bc5f34c6c79cddf817741cf797a3fcb3c5 (patch)
treed4a8c1881509a617ee87f2eb020a5f0f06bf2713 /libgfortran
parent8852c74501b457820e4e2e678f3aba4ddabace3c (diff)
downloadgcc-65ce19bc5f34c6c79cddf817741cf797a3fcb3c5.tar.gz
PR libfortran/19302
* intrinsics/c99_functions.c (nextafterf): Special-case infinite numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/intrinsics/c99_functions.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index de81b000ad9..9c0561b04c3 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-21 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR libfortran/19302
+ * intrinsics/c99_functions.c (nextafterf): Special-case infinite
+ numbers.
+
2005-02-21 Steven G. Kargl <kargls@comcast.net>
* io/write.c (output_float): Typo in error meesage.
diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c
index 7dd95918dcd..f7dc9777dd8 100644
--- a/libgfortran/intrinsics/c99_functions.c
+++ b/libgfortran/intrinsics/c99_functions.c
@@ -218,6 +218,8 @@ nextafterf(float x, float y)
return x + y;
if (x == y)
return x;
+ if (!isfinite (x))
+ return x > 0 ? __FLT_MAX__ : - __FLT_MAX__;
/* absx = fabsf (x); */
absx = (x < 0.0) ? -x : x;