[Bug libfortran/37839] st_parameter_dt has unwanted padding, is out of sync with compiler

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Nov 22 08:13:00 GMT 2008



------- Comment #16 from jakub at gcc dot gnu dot org  2008-11-22 08:12 -------
Subject: Bug 37839

Author: jakub
Date: Sat Nov 22 08:10:41 2008
New Revision: 142111

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142111
Log:
        PR libfortran/37839
        * trans-io.c (gfc_build_io_library_fndecls): Decrease pad size back
        to 16 pointers plus 32 integers.  Don't use max integer kind
        alignment, only gfc_intio_kind's alignment.
        (gfc_trans_inquire): Only set flags2 if mask2 is non-zero.
        * ioparm.def: Fix order, bitmasks and types of inquire round, sign
        and pending fields.  Move u in dt before id.
        * io.c (gfc_free_inquire): Free decimal and size exprs.
        (match_inquire_element): Match size instead of matching blank twice.
        (gfc_resolve_inquire): Resolve size.

        * gfortran.dg/f2003_inquire_1.f03: New test.
        * gfortran.dg/f2003_io_1.f03: Remove xfail.
        * gfortran.dg/f2003_io_4.f03: Likewise.
        * gfortran.dg/f2003_io_5.f03: Likewise.
        * gfortran.dg/f2003_io_6.f03: Likewise.
        * gfortran.dg/f2003_io_7.f03: Likewise.

        * io/io.h (IOPARM_INQUIRE_HAS_ROUND, IOPARM_INQUIRE_HAS_SIGN,
        IOPARM_INQUIRE_HAS_PENDING): Adjust values.
        (st_parameter_inquire): Reorder and fix types of round, sign and
        pending fields.
        (st_parameter_43, st_parameter_44): Removed.
        (st_parameter_dt): Put back struct definition directly to u.p
        declaration.  Change type of u.p.size_used from gfc_offset to
        GFC_IO_INT.  Decrease back size of u.pad to 16 pointers and
        32 ints.  Put id, pos, asynchronous, blank, decimal, delim,
        pad, round and sign fields after the union.
        * io/inquire.c (inquire_via_unit, inquire_via_filename): Only read
        flags2 if it is defined.
        * io/transfer.c (read_sf, read_block_form, write_block): Cast
        additions to size_used to GFC_IO_INT instead of gfc_offset.
        (data_transfer_init): Clear whole u.p struct.  Adjust
        for moving id, pos, asynchronous, blank, decimal, delim, pad,
        round and sign fields from u.p directly into st_parameter_dt.
        (finalize_transfer): Don't cast size_used to GFC_IO_INT.
        * io/file_pos.c (st_endfile): Clear whole u.p struct.

Added:
    trunk/gcc/testsuite/gfortran.dg/f2003_inquire_1.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/io.c
    trunk/gcc/fortran/ioparm.def
    trunk/gcc/fortran/trans-io.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/f2003_io_1.f03
    trunk/gcc/testsuite/gfortran.dg/f2003_io_4.f03
    trunk/gcc/testsuite/gfortran.dg/f2003_io_5.f03
    trunk/gcc/testsuite/gfortran.dg/f2003_io_6.f03
    trunk/gcc/testsuite/gfortran.dg/f2003_io_7.f03
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/file_pos.c
    trunk/libgfortran/io/inquire.c
    trunk/libgfortran/io/io.h
    trunk/libgfortran/io/transfer.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37839



More information about the Gcc-bugs mailing list