[patch,libgfortran] PR37707 Namelist read of array of derived type incorrect - round 2

Jerry DeLisle jvdelisle@verizon.net
Sun Oct 19 18:50:00 GMT 2008


Hi all,

This patch actually fixes a latent bug uncovered after the first patch was applied.

The standard requires that namelist delimit character strings with a quote or 
apostrophe. Our previous code was attempting to determine the difference between 
a string value and a namelist object name by looking ahead in the list for an 
"=" that what identify it as a name rather than a character value.  This code 
was not working in the context of the test case.

To bring us closer to the standard I have simply eliminated that somewhat 
complex code.

Also, in writing namelist character values, we were not using a delimiter by 
default as required by the standard.  I have revised this to default to a quote 
and allow the user to specify an apostrophe.  If delim=none is given, it is 
simply ignored and the default is used.

Regression tested on x86-64.  I will prepare two test cases.  One from the 
second more complex case that Toon provided in the PR and one from Tobias 
example of the namelist write problem.  I have to run out so I will get the 
Changelog made up as well when I get back.  The patch is pretty clear.

OK to commit?

Regards,

Jerry


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr37707-2.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081019/d2f32572/attachment.ksh>


More information about the Fortran mailing list