[patch, libgfortran] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
Jerry DeLisle
jvdelisle@verizon.net
Wed Feb 3 04:07:00 GMT 2010
Hi all,
This patch fixes this regression by adding an additional flag to identify when
array qualifiers have been seen for a derived type component. This flag is then
used to identify when to reset the current namelist pointer to the correct
namelist pointer (i.e. setting nl to first_nl).
The patch also cleans up the code by consolidating these flag tests in one place
just before the call to read the object. I attempted to clean this up so that
it is most readable. The logic is somewhat subtle to say the least.
As anyone figured out the half-life decay time for namelist bugs? :)
Regression tested on x86-64. New test case provided.
OK for trunk and then back port to 4.4 and 4.3?
Regards,
Jerry
2010-02-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
* io/list_read.c (nml_get_obj_data): Add new qualifier flag, clean up
code, and adjust logic to set namelist info pointer correctly for array
qualifiers of derived type components.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 2425 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100203/b21bba32/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: namelist_60.f90
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100203/b21bba32/attachment.f90>
More information about the Gcc-patches
mailing list