re PR libfortran/53051 (I/O: Support reading floating-point numbers which use "Q" for the exponent)
2012-04-22 Tobias Burnus <burnus@net-b.de> PR fortran/53051 * io/list_read.c (parse_real): Support "q" for the exponential. * io/read.c (read_f): Ditto. 2012-04-22 Tobias Burnus <burnus@net-b.de> PR fortran/53051 * gfortran.dg/read_float_4.f90: New. From-SVN: r186675
This commit is contained in:
parent
605aed299a
commit
96b3ee1c50
@ -1,3 +1,8 @@
|
||||
2012-04-22 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/53051
|
||||
* gfortran.dg/read_float_4.f90: New.
|
||||
|
||||
2012-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR 35441
|
||||
|
18
gcc/testsuite/gfortran.dg/read_float_4.f90
Normal file
18
gcc/testsuite/gfortran.dg/read_float_4.f90
Normal file
@ -0,0 +1,18 @@
|
||||
! { dg-do run }
|
||||
!
|
||||
! PR libgfortran/53051
|
||||
!
|
||||
! Check that reading "4.0q0" works, i.e. floating-point
|
||||
! numbers which use "q" to indicate the exponential.
|
||||
! (Which is a vendor extension.)
|
||||
!
|
||||
character(len=20) :: str
|
||||
real :: r
|
||||
integer :: i
|
||||
|
||||
r = 0
|
||||
str = '1.0q0'
|
||||
read(str, *, iostat=i) r
|
||||
if (r /= 1.0 .or. i /= 0) call abort()
|
||||
!print *, r
|
||||
end
|
@ -1,3 +1,10 @@
|
||||
2012-04-22 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/53051
|
||||
* io/list_read.c (parse_real): Support "q" for the
|
||||
exponential.
|
||||
* io/read.c (read_f): Ditto.
|
||||
|
||||
2012-04-17 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR libfortran/38199
|
||||
|
@ -1136,6 +1136,8 @@ parse_real (st_parameter_dt *dtp, void *buffer, int length)
|
||||
case 'E':
|
||||
case 'd':
|
||||
case 'D':
|
||||
case 'q':
|
||||
case 'Q':
|
||||
push_char (dtp, 'e');
|
||||
goto exp1;
|
||||
|
||||
@ -1449,6 +1451,8 @@ read_real (st_parameter_dt *dtp, void * dest, int length)
|
||||
case 'e':
|
||||
case 'D':
|
||||
case 'd':
|
||||
case 'Q':
|
||||
case 'q':
|
||||
goto exp1;
|
||||
|
||||
case '+':
|
||||
@ -1546,6 +1550,8 @@ read_real (st_parameter_dt *dtp, void * dest, int length)
|
||||
case 'e':
|
||||
case 'D':
|
||||
case 'd':
|
||||
case 'Q':
|
||||
case 'q':
|
||||
goto exp1;
|
||||
|
||||
case '+':
|
||||
|
@ -1026,6 +1026,8 @@ found_digit:
|
||||
case 'E':
|
||||
case 'd':
|
||||
case 'D':
|
||||
case 'q':
|
||||
case 'Q':
|
||||
++p;
|
||||
--w;
|
||||
goto exponent;
|
||||
|
Loading…
Reference in New Issue
Block a user