------- Comment #32 from tkoenig at gcc dot gnu dot org  2006-12-01 21:04 
-------
Subject: Bug 29568

Author: tkoenig
Date: Fri Dec  1 21:04:38 2006
New Revision: 119412

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119412
Log:
2006-12-01  Thomas Koenig  <[EMAIL PROTECTED]>

        PR libfortran/29568
        * gfortran.dg/convert_implied_open.f90:  Change to
        new default record length.
        * gfortran.dg/unf_short_record_1.f90:  Adapt to
        new error message.
        * gfortran.dg/unformatted_subrecords_1.f90:  New test.

2006-12-01  Thomas Koenig  <[EMAIL PROTECTED]>

        PR libfortran/29568
        * gfortran.h (gfc_option_t):  Add max_subrecord_length.
        (top level): Define MAX_SUBRECORD_LENGTH.
        * lang.opt:  Add option -fmax-subrecord-length=.
        * trans-decl.c:  Add new function set_max_subrecord_length.
        (gfc_generate_function_code): If we are within the main
        program and max_subrecord_length has been set, call
        set_max_subrecord_length.
        * options.c (gfc_init_options):  Add defaults for
        max_subrecord_lenght, convert and record_marker.
        (gfc_handle_option):  Add handling for
        -fmax_subrecord_length.
        * invoke.texi:  Document the new default for
        -frecord-marker=<n>.

2006-12-01  Thomas Koenig  <[EMAIL PROTECTED]>

        PR libfortran/29568
        * libgfortran/libgfortran.h (compile_options_t):  Add
        record_marker. (top level):  Define GFC_MAX_SUBRECORD_LENGTH.
        * runtime/compile_options.c (set_record_marker):  Change
        default to four-byte record marker.
        (set_max_subrecord_length):  New function.
        * runtime/error.c (translate_error):  Change error message
        for short record on unformatted read.
        * io/io.h (gfc_unit):  Add recl_subrecord, bytes_left_subrecord
        and continued.
        * io/file_pos.c (unformatted_backspace):  Change default of record
        marker size to four bytes.  Loop over subrecords.
        * io/open.c:  Default recl is max_offset.  If
        compile_options.max_subrecord_length has been set, set set
        u->recl_subrecord to its value, to the maximum value otherwise.
        * io/transfer.c (top level):  Add prototypes for us_read, us_write,
        next_record_r_unf and next_record_w_unf.
        (read_block_direct):  Separate codepaths for unformatted direct
        and unformatted sequential.  If a recl has been set by the
        user, use the number of bytes left for the record if it is smaller
        than the read request.  Loop over subrecords.  Set an error if the
        user has set a recl and the read was short.
        (write_buf):  Separate codepaths for unformatted direct and
        unformatted sequential. If a recl has been set by the
        user, use the number of bytes left for the record if it is smaller
        than the read request.  Loop over subrecords.  Set an error if the
        user has set a recl and the read was short.
        (us_read):  Add parameter continued (to indicate that bytes_left
        should not be intialized).  Change default of record marker size
        to four bytes. Use subrecord.  If the subrecord length is smaller than
        zero, this indicates a continuation.
        (us_write):  Add parameter continued (to indicate that the continued
        flag should be set).  Use subrecord.
        (pre_position):  Use 0 for continued on us_write and us_read calls.
        (skip_record):  New function.
        (next_record_r_unf):  New function.
        (next_record_r):  Use next_record_r_unf.
        (write_us_marker):  Default size for record markers is four bytes.
        (next_record_w_unf):  New function.
        (next_record_w):  Use next_record_w_unf.


Added:
    trunk/gcc/testsuite/gfortran.dg/unformatted_subrecord_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/convert_implied_open.f90
    trunk/gcc/testsuite/gfortran.dg/unf_short_record_1.f90
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/file_pos.c
    trunk/libgfortran/io/io.h
    trunk/libgfortran/io/open.c
    trunk/libgfortran/io/transfer.c
    trunk/libgfortran/libgfortran.h
    trunk/libgfortran/runtime/compile_options.c
    trunk/libgfortran/runtime/error.c


-- 


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

Reply via email to