[patch,fortran] F2003 Inquire features
Jerry DeLisle
jvdelisle@verizon.net
Mon Apr 7 20:39:00 GMT 2008
On Mon, 2008-04-07 at 00:00 -0700, Jerry DeLisle wrote:
> On Sun, 2008-04-06 at 23:53 -0700, Jerry DeLisle wrote:
> > Hi,
> >
> > Attached is the next installment on this effort. This patch implements
> > the remaining inquire specifiers. It also adds the pad=, and delim=
> > features. The delim= now works for list directed WRITE.
> >
> > I also enabled encoding="default" and round= in the INQUIRE.
> >
> > I am working up some test cases now but thought it useful for people to
> > start reviewing and independent testing.
> >
> > I have one constraint to add which is ID= in an INQUIRE must be
> > accompanied by a pending= .
Attached is the final patch of this installment.
Regression tested and NIST tested. I am still working up test cases to
add.
OK to commit?
Regards,
Jerry
2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* gfortran.dg/write_check2.f90: Update dg-error.
* gfortran.dg/io_constraints_1.f90: Update dg-error.
2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
round, sign, and id. (match_open_element): Match new tags.
(gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
for DEFAULT only. Update error messages. (match_dt_element): Fix match
tag for asynchronous. Update error messages. (gfc_free_inquire): Free
new expressions. (match_inquire_element): Match new tags.
(gfc_match_inquire): Add constraint for ID and PENDING.
(gfc_resolve_inquire): Resolve new tags.
* trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting
of
mask for ID parameter.
* ioparm.def: Fix order of parameters for pending, round, and sign.
NOTE: These must line up with the definitions in libgfortran/io/io.h.
or
things don't work.
2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/open.c (edit_modes): Set flags.async. (new_unit) Set flags.async
and flags.status. (st_open): Initialize flags.async.
* io/list_read.c (read_charactor): Use delim_status instead of
flags.delim.
* io/read.c (read_x): Use pad_status instead of flags.pad.
* io/inquire.c (inquire_via_unit): Add new checks.
(inquire_via_filename): Likewise.
* io/io.h (st_parameter_inquire): Add new flags.
(st_parameter_dt): Likewise.
* io/unit.c (get_internal_unit): Set flags.async. (init_units): Set
flags.async.
* io/transfer.c: Add delim and pad option arrays. (read_sf): Use
pad_status instead of flags.pad. (read_block): Likewise.
(data_transfer_init): Set flags.async and add checks.
* io/write.c (write_character): Use delim_status.
(list_formatted_write_scalar): Likewise. (nml_write_obj): Likewise.
(namelist_write): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f2003-inquire-revC.diff
Type: text/x-patch
Size: 32845 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080407/c71183b0/attachment.bin>
More information about the Fortran
mailing list