diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-04-22 19:28:34 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-04-22 19:28:34 +0200 |
commit | 96b3ee1c504a6507154bbbfcf081a8f969fb8671 (patch) | |
tree | cc4011cbfad42177e24d9d5e9e289e2605902624 /libgfortran/io | |
parent | 605aed299a7ed53547a9f61ba31e63a480901653 (diff) | |
download | gcc-96b3ee1c504a6507154bbbfcf081a8f969fb8671.zip gcc-96b3ee1c504a6507154bbbfcf081a8f969fb8671.tar.gz gcc-96b3ee1c504a6507154bbbfcf081a8f969fb8671.tar.bz2 |
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
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/list_read.c | 6 | ||||
-rw-r--r-- | libgfortran/io/read.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 2024fcd..4d2ce79 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -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 '+': diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index aa41bc7..32c8b32 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -1026,6 +1026,8 @@ found_digit: case 'E': case 'd': case 'D': + case 'q': + case 'Q': ++p; --w; goto exponent; |