diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-15 23:03:28 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-15 23:03:28 +0000 |
commit | e83964b23af081bec09add65a9ab27772c729bad (patch) | |
tree | 69155a97cbe4b81569cdabce8b9f3f44a1536d34 /gcc/fortran/io.c | |
parent | f948b309012c6347d2b04e9cb57602cadafdc0f6 (diff) | |
download | gcc-e83964b23af081bec09add65a9ab27772c729bad.tar.gz |
2006-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25828
* gfortran.h: Add new pointer for stream position to st_inquire.
Rename gfc_large_io_int_kind to gfc_intio_kind.
* trans-types.c (gfc_init_kinds): use gfc_intio_kind.
* io.c: Add new IO tag for file position going in and another for out.
(match_dt_element): Match new tag_spos.
(gfc_resolve_dt): Resolve new tag_spos.
(gfc_free_inquire): Free inquire->strm_pos.
(match_inquire_element): Match new tag_strm_out.
(gfc_resolve_inquire): Resolve new tag_strm_out.
* trans-io.c: Rename IOPARM_type_large_io_int to IOPARM_type_intio.
(gfc_build_st_parameter): Same.
(gfc_build_io_library_fndecls) Same. and add build pointer type pintio.
(gfc_trans_inquire): Translate strm_pos for inquire.
* ioparm.def: Reorder flags to accomodate addition of new inquire
flag for strm_pos_out and add it in.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116171 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 6cf74ee69f7..a95cd2c8361 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -52,6 +52,7 @@ static const io_tag tag_unit = {"UNIT", " unit = %e", BT_INTEGER}, tag_advance = {"ADVANCE", " advance = %e", BT_CHARACTER}, tag_rec = {"REC", " rec = %e", BT_INTEGER}, + tag_spos = {"POSITION", " pos = %e", BT_INTEGER}, tag_format = {"FORMAT", NULL, BT_CHARACTER}, tag_iomsg = {"IOMSG", " iomsg = %e", BT_CHARACTER}, tag_iostat = {"IOSTAT", " iostat = %v", BT_INTEGER}, @@ -79,6 +80,7 @@ static const io_tag tag_s_pad = {"PAD", " pad = %v", BT_CHARACTER}, tag_iolength = {"IOLENGTH", " iolength = %v", BT_INTEGER}, tag_convert = {"CONVERT", " convert = %e", BT_CHARACTER}, + tag_strm_out = {"POS", " pos = %v", BT_INTEGER}, tag_err = {"ERR", " err = %l", BT_UNKNOWN}, tag_end = {"END", " end = %l", BT_UNKNOWN}, tag_eor = {"EOR", " eor = %l", BT_UNKNOWN}; @@ -1784,6 +1786,9 @@ match_dt_element (io_kind k, gfc_dt * dt) m = match_etag (&tag_rec, &dt->rec); if (m != MATCH_NO) return m; + m = match_etag (&tag_spos, &dt->rec); + if (m != MATCH_NO) + return m; m = match_out_tag (&tag_iomsg, &dt->iomsg); if (m != MATCH_NO) return m; @@ -1855,6 +1860,7 @@ gfc_resolve_dt (gfc_dt * dt) RESOLVE_TAG (&tag_format, dt->format_expr); RESOLVE_TAG (&tag_rec, dt->rec); + RESOLVE_TAG (&tag_spos, dt->rec); RESOLVE_TAG (&tag_advance, dt->advance); RESOLVE_TAG (&tag_iomsg, dt->iomsg); RESOLVE_TAG (&tag_iostat, dt->iostat); @@ -2643,6 +2649,7 @@ gfc_free_inquire (gfc_inquire * inquire) gfc_free_expr (inquire->pad); gfc_free_expr (inquire->iolength); gfc_free_expr (inquire->convert); + gfc_free_expr (inquire->strm_pos); gfc_free (inquire); } @@ -2685,6 +2692,7 @@ match_inquire_element (gfc_inquire * inquire) RETM m = match_vtag (&tag_s_pad, &inquire->pad); RETM m = match_vtag (&tag_iolength, &inquire->iolength); RETM m = match_vtag (&tag_convert, &inquire->convert); + RETM m = match_out_tag (&tag_strm_out, &inquire->strm_pos); RETM return MATCH_NO; } @@ -2839,6 +2847,7 @@ gfc_resolve_inquire (gfc_inquire * inquire) RESOLVE_TAG (&tag_s_pad, inquire->pad); RESOLVE_TAG (&tag_iolength, inquire->iolength); RESOLVE_TAG (&tag_convert, inquire->convert); + RESOLVE_TAG (&tag_strm_out, inquire->strm_pos); if (gfc_reference_st_label (inquire->err, ST_LABEL_TARGET) == FAILURE) return FAILURE; |