[Patch, fortran] PR54679 Erroneous "Expected P edit descriptor" in conjunction with L descriptor
Jerry DeLisle
jvdelisle@charter.net
Sun Oct 30 16:33:00 GMT 2016
Hi All,
Gfortran currently treats an L format descriptor with no width as an extension.
When the width is zero (not a positive integer) the error message was confused.
The checking software was saving the format token, FMT_ZERO, for the next round
of checks and this was interpreted to be a zero preceding a P edit descriptor.
This is fixed by adding the check for FMT_ZERO explicitly. I also added
diagnostic messages to better explain the error. L0 is also allowed now as an
extension.
Regression tested on x86-64-linux. New test case included in patch as well as
adjusting the text for fmt_l.f90
OK for trunk?
Jerry
2016-10-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/54679
* io.c (check_format): Adjust checks for FMT_L to treat a zero
width as an extension, giving warnings or error as appropriate.
Improve messages.
2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/54679
* io/format.c (parse_format_list): Adjust checks for FMT_L to
treat a zero width as an extension, giving warnings or error
as appropriate. Improve messages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr54679.diff
Type: text/x-patch
Size: 7286 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161030/aa17adaa/attachment.bin>
More information about the Fortran
mailing list