aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2006-09-15 16:03:52 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2006-09-15 16:03:52 +0000
commitf49d5a7eca3baec3ba954934d55eaa24d74e8699 (patch)
treea324d7d249de55170f6d6c7135c0dcf540cee632 /libgfortran
parent615d37d2bb487ed96edfe0897c14ea40ff8a60f8 (diff)
downloadgcc-f49d5a7eca3baec3ba954934d55eaa24d74e8699.zip
gcc-f49d5a7eca3baec3ba954934d55eaa24d74e8699.tar.gz
gcc-f49d5a7eca3baec3ba954934d55eaa24d74e8699.tar.bz2
re PR libfortran/29099 (secnds intrinsic gives wrong result)
2006-09-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29099 * intrinsics/date_and_time.c (secnds): Fix case of zero time. From-SVN: r116975
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/intrinsics/date_and_time.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index b399bbe..3832663 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,4 +1,9 @@
-2006-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+2006-09-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/29099
+ * intrinsics/date_and_time.c (secnds): Fix case of zero time.
+
+2006-09-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/29053
* io.h (gfc_unit): Add variable, strm_pos, to track
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c
index 6a4131f..9255176 100644
--- a/libgfortran/intrinsics/date_and_time.c
+++ b/libgfortran/intrinsics/date_and_time.c
@@ -356,7 +356,7 @@ secnds (GFC_REAL_4 *x)
(GFC_REAL_4)values[6] +
0.001 * (GFC_REAL_4)values[7];
temp2 = fmod (*x, 86400.0);
- temp2 = (temp1 - temp2 > 0.0) ? temp2 : (temp2 - 86400.0);
+ temp2 = (temp1 - temp2 >= 0.0) ? temp2 : (temp2 - 86400.0);
return temp1 - temp2;
}