diff options
author | Fritz Reese <fritzoreese@gmail.com> | 2016-11-03 18:09:44 +0000 |
---|---|---|
committer | Fritz Reese <foreese@gcc.gnu.org> | 2016-11-03 18:09:44 +0000 |
commit | 6869e9c69f446161edba48722a75813934643382 (patch) | |
tree | 4b3e9356f44befe3d696e42639572508aa2db76c /gcc/fortran/io.c | |
parent | 1bac673faf4a0a0bd0a5606dad9d98b33d568510 (diff) | |
download | gcc-6869e9c69f446161edba48722a75813934643382.zip gcc-6869e9c69f446161edba48722a75813934643382.tar.gz gcc-6869e9c69f446161edba48722a75813934643382.tar.bz2 |
Default missing exponents to 0 with -fdec.
gcc/fortran/
* gfortran.texi: Document.
* gfortran.h (gfc_dt): New field default_exp.
* primary.c (match_real_constant): Default exponent with -fdec.
* io.c (match_io): Set dt.default_exp with -fdec.
* ioparm.def (IOPARM_dt_default_exp): New.
* trans-io.c (build_dt): Set IOPARM_dt_default_exp with -fdec.
libgfortran/io/
* io.h (IOPARM_DT_DEFAULT_EXP): New flag bit.
* list_read.c (parse_real, read_real): Allow omission of exponent with
IOPARM_DT_DEFAULT_EXP.
* read.c (read_f): Ditto.
gcc/testsuite/gfortran.dg/
* dec_exp_1.f90, dec_exp_2.f90, dec_exp_3.f90: New testcases.
From-SVN: r241828
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 80cf830..04cc1a2 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -4167,6 +4167,10 @@ get_io_list: goto syntax; } + /* See if we want to use defaults for missing exponents in real transfers. */ + if (flag_dec) + dt->default_exp = 1; + /* A full IO statement has been matched. Check the constraints. spec_end is supplied for cases where no locus is supplied. */ m = check_io_constraints (k, dt, io_code, &spec_end); |