diff options
author | Yvan Roux <yvan.roux@linaro.org> | 2016-10-16 20:58:44 +0200 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2016-10-16 20:58:44 +0200 |
commit | d2aef70a07da5e77ef45b87973e960558b475315 (patch) | |
tree | 28f6e11cd8a13343f7c2aa7271cc2b1c802c6e8c /libgfortran | |
parent | 5f58418d2b60e6a7cfdb655ae13ff3aaeebf5bdd (diff) |
Merge branches/gcc-5-branch rev 241215.
Change-Id: I17f93cbd80460a38eebd86fabeae3c500df715dd
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 21 | ||||
-rw-r--r-- | libgfortran/ieee/ieee_arithmetic.F90 | 16 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 2 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 7 |
4 files changed, 34 insertions, 12 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index b8ce7e7404c..9048779f853 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,24 @@ +2016-09-29 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + Backport from trunk + PR libgfortran/77707 + io/transfer.c (next_record): Flush before calculating next_record. + Correctly calculate. + +2016-09-29 Steven G. Kargl <kargl@gcc.gnu.org> + + Backport from trunk + PR fortran/77507 + * ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10, + IEEE_VALUE_16): Use correct keyword. + +2016-08-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + Backport from trunk + PR libgfortran/71123 + PR libgfortran/73142 + * io/list_read (eat_spaces): Eat '\r' as part of spaces. + 2016-06-03 Release Manager * GCC 5.4.0 released. diff --git a/libgfortran/ieee/ieee_arithmetic.F90 b/libgfortran/ieee/ieee_arithmetic.F90 index f81a4f89e13..ee890585976 100644 --- a/libgfortran/ieee/ieee_arithmetic.F90 +++ b/libgfortran/ieee/ieee_arithmetic.F90 @@ -500,12 +500,12 @@ contains ! IEEE_VALUE - elemental real(kind=4) function IEEE_VALUE_4(X, C) result(res) - implicit none + elemental real(kind=4) function IEEE_VALUE_4(X, CLASS) result(res) + real(kind=4), intent(in) :: X - type(IEEE_CLASS_TYPE), intent(in) :: C + type(IEEE_CLASS_TYPE), intent(in) :: CLASS - select case (C%hidden) + select case (CLASS%hidden) case (1) ! IEEE_SIGNALING_NAN res = -1 res = sqrt(res) @@ -538,12 +538,12 @@ contains end select end function - elemental real(kind=8) function IEEE_VALUE_8(X, C) result(res) - implicit none + elemental real(kind=8) function IEEE_VALUE_8(X, CLASS) result(res) + real(kind=8), intent(in) :: X - type(IEEE_CLASS_TYPE), intent(in) :: C + type(IEEE_CLASS_TYPE), intent(in) :: CLASS - select case (C%hidden) + select case (CLASS%hidden) case (1) ! IEEE_SIGNALING_NAN res = -1 res = sqrt(res) diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 6b42ecf1824..b682b111f81 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -418,7 +418,7 @@ eat_spaces (st_parameter_dt *dtp) /* Now skip spaces, EOF and EOL are handled in next_char. */ do c = next_char (dtp); - while (c != EOF && (c == ' ' || c == '\t')); + while (c != EOF && (c == ' ' || c == '\r' || c == '\t')); unget_char (dtp, c); return c; diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 746bb6dcc6c..f49052c8a62 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -3502,6 +3502,8 @@ next_record (st_parameter_dt *dtp, int done) else next_record_w (dtp, done); + fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode); + if (!is_stream_io (dtp)) { /* Since we have changed the position, set it to unspecified so @@ -3515,8 +3517,8 @@ next_record (st_parameter_dt *dtp, int done) fp = stell (dtp->u.p.current_unit->s); /* Calculate next record, rounding up partial records. */ dtp->u.p.current_unit->last_record = - (fp + dtp->u.p.current_unit->recl - 1) / - dtp->u.p.current_unit->recl; + (fp + dtp->u.p.current_unit->recl) / + dtp->u.p.current_unit->recl - 1; } else dtp->u.p.current_unit->last_record++; @@ -3525,7 +3527,6 @@ next_record (st_parameter_dt *dtp, int done) if (!done) pre_position (dtp); - fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode); smarkeor (dtp->u.p.current_unit->s); } |