This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, libgfortran] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
- From: Tobias Burnus <burnus at net-b dot de>
- To: Jerry DeLisle <jvdelisle at charter dot net>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 31 Mar 2013 22:06:12 +0200
- Subject: Re: [Patch, libgfortran] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
- References: <5157B336 dot 8010301 at charter dot net>
Am 31.03.2013 05:53, schrieb Jerry DeLisle:
The attached patch fixes this PR by removing a spurious call to next_char which
threw off the parsing sequence. In addition, I audited the file for other tests
of EOF and corrected the error handling. This eliminated some wrong error
messages or undefined error messages when an EOF is encountered during a
Also needed to modify hit_eof to not set the file position status for namelist
mode to AFTER_ENDFILE to assure we get the correct EOF error.
Also attached is the original test case from the PR, modified to include some
reads cut short by EOF.
Regression tested on x86-64.
OK for trunk?
OK thanks for the patch - with the clarification in the comment below
"err_ret:" (in the two functions), as discussed in IRC.
2013-03-29 Jerry DeLisle<email@example.com>
* io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
when checking for EOF. Use error return mechanism when EOF detected.
Do not return false unless parse_err_msg and parse_err_msg_size have
been set. Use hit_eof.
(nml_get_obj_data): Likewise use the correct error mechanism.
* io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist