diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-15 16:03:52 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-15 16:03:52 +0000 |
commit | df862fe17b02767360fbb0bfcdf646e55b183c7e (patch) | |
tree | a324d7d249de55170f6d6c7135c0dcf540cee632 /libgfortran | |
parent | 35ca3ada63791b7d7b59a1ac2b6b11e35eb37160 (diff) | |
download | gcc-df862fe17b02767360fbb0bfcdf646e55b183c7e.tar.gz |
2006-09-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/29099
* intrinsics/date_and_time.c (secnds): Fix case of zero time.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/intrinsics/date_and_time.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index b399bbeed99..38326632b4b 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 6a4131f7ddc..9255176adcb 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; } |