re PR fortran/48976 (INQUIRE with STREAM= not supported)
2012-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/48976 * gfortran.h (gfc_inquire struct): Add pointer for inquire stream. * io.c (io_tag): Add tag for inquire stream. (match_inquire_element): Add matcher for new tag. (gfc_resolve_inquire): Resolve new tag. * ioparm.def: Add new parameter for inquire stream. * trans-io.c (gfc_trans_inquire): Add tranlste code for inquire stream. From-SVN: r194734
This commit is contained in:
parent
797332eda9
commit
93e8af199c
@ -1,3 +1,13 @@
|
||||
2012-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/48976
|
||||
* gfortran.h (gfc_inquire struct): Add pointer for inquire stream.
|
||||
* io.c (io_tag): Add tag for inquire stream. (match_inquire_element):
|
||||
Add matcher for new tag. (gfc_resolve_inquire): Resolve new tag.
|
||||
* ioparm.def: Add new parameter for inquire stream.
|
||||
* trans-io.c (gfc_trans_inquire): Add tranlste code for inquire
|
||||
stream.
|
||||
|
||||
2012-12-23 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/54884
|
||||
|
@ -2008,7 +2008,8 @@ typedef struct
|
||||
*name, *access, *sequential, *direct, *form, *formatted,
|
||||
*unformatted, *recl, *nextrec, *blank, *position, *action, *read,
|
||||
*write, *readwrite, *delim, *pad, *iolength, *iomsg, *convert, *strm_pos,
|
||||
*asynchronous, *decimal, *encoding, *pending, *round, *sign, *size, *id;
|
||||
*asynchronous, *decimal, *encoding, *pending, *round, *sign, *size, *id,
|
||||
*iqstream;
|
||||
|
||||
gfc_st_label *err;
|
||||
|
||||
|
@ -97,7 +97,8 @@ static const io_tag
|
||||
tag_eor = {"EOR", " eor =", " %l", BT_UNKNOWN},
|
||||
tag_id = {"ID", " id =", " %v", BT_INTEGER},
|
||||
tag_pending = {"PENDING", " pending =", " %v", BT_LOGICAL},
|
||||
tag_newunit = {"NEWUNIT", " newunit =", " %v", BT_INTEGER};
|
||||
tag_newunit = {"NEWUNIT", " newunit =", " %v", BT_INTEGER},
|
||||
tag_s_iqstream = {"STREAM", " stream =", " %v", BT_CHARACTER};
|
||||
|
||||
static gfc_dt *current_dt;
|
||||
|
||||
@ -3912,6 +3913,7 @@ match_inquire_element (gfc_inquire *inquire)
|
||||
RETM m = match_out_tag (&tag_strm_out, &inquire->strm_pos);
|
||||
RETM m = match_vtag (&tag_pending, &inquire->pending);
|
||||
RETM m = match_vtag (&tag_id, &inquire->id);
|
||||
RETM m = match_vtag (&tag_s_iqstream, &inquire->iqstream);
|
||||
RETM return MATCH_NO;
|
||||
}
|
||||
|
||||
@ -4101,6 +4103,7 @@ gfc_resolve_inquire (gfc_inquire *inquire)
|
||||
INQUIRE_RESOLVE_TAG (&tag_pending, inquire->pending);
|
||||
INQUIRE_RESOLVE_TAG (&tag_size, inquire->size);
|
||||
INQUIRE_RESOLVE_TAG (&tag_s_decimal, inquire->decimal);
|
||||
INQUIRE_RESOLVE_TAG (&tag_s_iqstream, inquire->iqstream);
|
||||
#undef INQUIRE_RESOLVE_TAG
|
||||
|
||||
if (gfc_reference_st_label (inquire->err, ST_LABEL_TARGET) == FAILURE)
|
||||
|
@ -88,6 +88,7 @@ IOPARM (inquire, sign, 1 << 4, char1)
|
||||
IOPARM (inquire, pending, 1 << 5, pint4)
|
||||
IOPARM (inquire, size, 1 << 6, pintio)
|
||||
IOPARM (inquire, id, 1 << 7, pint4)
|
||||
IOPARM (inquire, iqstream, 1 << 8, char1)
|
||||
IOPARM (wait, common, 0, common)
|
||||
IOPARM (wait, id, 1 << 7, pint4)
|
||||
#ifndef IOPARM_dt_list_format
|
||||
|
@ -1364,6 +1364,9 @@ gfc_trans_inquire (gfc_code * code)
|
||||
if (p->id)
|
||||
mask2 |= set_parameter_ref (&block, &post_block,var, IOPARM_inquire_id,
|
||||
p->id);
|
||||
if (p->iqstream)
|
||||
mask2 |= set_string (&block, &post_block, var, IOPARM_inquire_iqstream,
|
||||
p->iqstream);
|
||||
|
||||
if (mask2)
|
||||
mask |= set_parameter_const (&block, var, IOPARM_inquire_flags2, mask2);
|
||||
|
Loading…
Reference in New Issue
Block a user