Commit b8d5e926 by Tobias Schlüter

re PR fortran/19194 (Missing RECL parameter in OPEN statement)

gcc/fortran/
PR fortran/19194
* trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
length parameters.
(gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
pointer fields.

libgfortran/
PR fortran/19194
* io/io.h (st_parameter): Use 'GFC_INTEGER_4' instead of 'int',
use CHARACTER macro for definition of string valued paramters.

Also fix years in recent ChangeLog entries.

From-SVN: r94065
parent 1e052c19
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
* trans-const.c (gfc_conv_constant_to_tree): Give logical * trans-const.c (gfc_conv_constant_to_tree): Give logical
constants the correct type. constants the correct type.
PR fortran/19194
* trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
length parameters.
(gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
pointer fields.
2005-01-18 Kazu Hirata <kazu@cs.umass.edu> 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
* arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c, * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
......
...@@ -147,7 +147,7 @@ static enum { READ, WRITE, IOLENGTH } last_dt; ...@@ -147,7 +147,7 @@ static enum { READ, WRITE, IOLENGTH } last_dt;
get_identifier (stringize(name)), pchar_type_node); \ get_identifier (stringize(name)), pchar_type_node); \
ioparm_ ## name ## _len = gfc_add_field_to_struct \ ioparm_ ## name ## _len = gfc_add_field_to_struct \
(&(TYPE_FIELDS (ioparm_type)), ioparm_type, \ (&(TYPE_FIELDS (ioparm_type)), ioparm_type, \
get_identifier (stringize(name) "_len"), gfc_int4_type_node) get_identifier (stringize(name) "_len"), gfc_charlen_type_node)
/* Create function decls for IO library functions. */ /* Create function decls for IO library functions. */
...@@ -181,11 +181,11 @@ gfc_build_io_library_fndecls (void) ...@@ -181,11 +181,11 @@ gfc_build_io_library_fndecls (void)
ADD_FIELD (opened, gfc_pint4_type_node); ADD_FIELD (opened, gfc_pint4_type_node);
ADD_FIELD (number, gfc_pint4_type_node); ADD_FIELD (number, gfc_pint4_type_node);
ADD_FIELD (named, gfc_pint4_type_node); ADD_FIELD (named, gfc_pint4_type_node);
ADD_FIELD (rec, gfc_pint4_type_node); ADD_FIELD (rec, gfc_int4_type_node);
ADD_FIELD (nextrec, gfc_pint4_type_node); ADD_FIELD (nextrec, gfc_pint4_type_node);
ADD_FIELD (size, gfc_pint4_type_node); ADD_FIELD (size, gfc_pint4_type_node);
ADD_FIELD (recl_in, gfc_pint4_type_node); ADD_FIELD (recl_in, gfc_int4_type_node);
ADD_FIELD (recl_out, gfc_pint4_type_node); ADD_FIELD (recl_out, gfc_pint4_type_node);
ADD_FIELD (iolength, gfc_pint4_type_node); ADD_FIELD (iolength, gfc_pint4_type_node);
......
2004-01-22 Bud Davis <bdavis9659@comcast.net> 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/19194
* io/io.h (st_parameter): Use 'GFC_INTEGER_4' instead of 'int',
use CHARACTER macro for definition of string valued paramters.
2005-01-22 Bud Davis <bdavis9659@comcast.net>
PR fortran/19314 PR fortran/19314
* io/inquire.c(inquire_via_unit): implement POSITION=. * io/inquire.c(inquire_via_unit): implement POSITION=.
...@@ -7,7 +13,7 @@ ...@@ -7,7 +13,7 @@
* io/rewind.c(st_rewind): update position for * io/rewind.c(st_rewind): update position for
INQUIRE. INQUIRE.
2004-01-16 Bud Davis <bdavis9659@comcast.net> 2005-01-16 Bud Davis <bdavis9659@comcast.net>
PR fortran/18778 PR fortran/18778
* io/transfer.c (us_read): no bytes available is not a * io/transfer.c (us_read): no bytes available is not a
......
/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. /* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Andy Vaught Contributed by Andy Vaught
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -165,8 +165,8 @@ unit_mode; ...@@ -165,8 +165,8 @@ unit_mode;
typedef struct typedef struct
{ {
int unit; GFC_INTEGER_4 unit;
int err, end, eor, list_format; /* These are flags, not values. */ GFC_INTEGER_4 err, end, eor, list_format; /* These are flags, not values. */
/* Return values from library statements. These are returned only if /* Return values from library statements. These are returned only if
the labels are specified in the statement itself and the condition the labels are specified in the statement itself and the condition
...@@ -183,58 +183,44 @@ typedef struct ...@@ -183,58 +183,44 @@ typedef struct
} }
library_return; library_return;
int *iostat, *exist, *opened, *number, *named, rec, *nextrec, *size; GFC_INTEGER_4 *iostat, *exist, *opened, *number, *named;
GFC_INTEGER_4 rec;
int recl_in; GFC_INTEGER_4 *nextrec, *size;
int *recl_out;
GFC_INTEGER_4 recl_in;
int *iolength; GFC_INTEGER_4 *recl_out;
char *file; GFC_INTEGER_4 *iolength;
int file_len;
char *status; #define CHARACTER(name) \
int status_len; char * name; \
char *access; gfc_charlen_type name ## _len
int access_len; CHARACTER (file);
char *form; CHARACTER (status);
int form_len; CHARACTER (access);
char *blank; CHARACTER (form);
int blank_len; CHARACTER (blank);
char *position; CHARACTER (position);
int position_len; CHARACTER (action);
char *action; CHARACTER (delim);
int action_len; CHARACTER (pad);
char *delim; CHARACTER (format);
int delim_len; CHARACTER (advance);
char *pad; CHARACTER (name);
int pad_len; CHARACTER (internal_unit);
char *format; CHARACTER (sequential);
int format_len; CHARACTER (direct);
char *advance; CHARACTER (formatted);
int advance_len; CHARACTER (unformatted);
char *name; CHARACTER (read);
int name_len; CHARACTER (write);
char *internal_unit; CHARACTER (readwrite);
int internal_unit_len;
char *sequential;
int sequential_len;
char *direct;
int direct_len;
char *formatted;
int formatted_len;
char *unformatted;
int unformatted_len;
char *read;
int read_len;
char *write;
int write_len;
char *readwrite;
int readwrite_len;
/* namelist related data */ /* namelist related data */
char * namelist_name; CHARACTER (namelist_name);
int namelist_name_len; GFC_INTEGER_4 namelist_read_mode;
int namelist_read_mode;
#undef CHARACTER
} }
st_parameter; st_parameter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment