re PR libfortran/25289 (Cannot handle record numbers large than huge(0_4))
2006-07-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/25289 * gfortran.h: Declare gfc_large_io_int_kind. * trans-types.c (gfc_init_kinds): Set gfc_large_io_int_kind to size 8 or 4. * trans-io.c (enum iofield_type): Add large_io_int type. (gfc_build_st_parameter): Same. (gfc_build_io_library_fndecls): Same. * ioparm_def: Use large_io_int to define rec. From-SVN: r115700
This commit is contained in:
parent
566ffce895
commit
4fec64b07b
5 changed files with 34 additions and 2 deletions
|
@ -1,6 +1,17 @@
|
|||
2006-07-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/25289
|
||||
* gfortran.h: Declare gfc_large_io_int_kind.
|
||||
* trans-types.c (gfc_init_kinds): Set gfc_large_io_int_kind
|
||||
to size 8 or 4.
|
||||
* trans-io.c (enum iofield_type): Add large_io_int type.
|
||||
(gfc_build_st_parameter): Same.
|
||||
(gfc_build_io_library_fndecls): Same.
|
||||
* ioparm_def: Use large_io_int to define rec.
|
||||
|
||||
2006-07-22 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
PR fortran/28439
|
||||
PR fortran/28439
|
||||
* trans-stmt.c (gfc_trans_arithmetic_if): Evaluate the condition once.
|
||||
|
||||
2006-07-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
|
|
@ -1806,6 +1806,7 @@ extern int gfc_default_character_kind;
|
|||
extern int gfc_default_logical_kind;
|
||||
extern int gfc_default_complex_kind;
|
||||
extern int gfc_c_int_kind;
|
||||
extern int gfc_large_io_int_kind;
|
||||
|
||||
/* symbol.c */
|
||||
void gfc_clear_new_implicit (void);
|
||||
|
|
|
@ -58,7 +58,7 @@ IOPARM (inquire, convert, 1 << 29, char1)
|
|||
#define IOPARM_dt_namelist_read_mode (1 << 8)
|
||||
#endif
|
||||
IOPARM (dt, common, 0, common)
|
||||
IOPARM (dt, rec, 1 << 9, int4)
|
||||
IOPARM (dt, rec, 1 << 9, large_io_int)
|
||||
IOPARM (dt, size, 1 << 10, pint4)
|
||||
IOPARM (dt, iolength, 1 << 11, pint4)
|
||||
IOPARM (dt, internal_unit_desc, 0, parray)
|
||||
|
|
|
@ -52,6 +52,7 @@ enum ioparam_type
|
|||
enum iofield_type
|
||||
{
|
||||
IOPARM_type_int4,
|
||||
IOPARM_type_large_io_int,
|
||||
IOPARM_type_pint4,
|
||||
IOPARM_type_pchar,
|
||||
IOPARM_type_parray,
|
||||
|
@ -168,6 +169,7 @@ gfc_build_st_parameter (enum ioparam_type ptype, tree *types)
|
|||
switch (p->type)
|
||||
{
|
||||
case IOPARM_type_int4:
|
||||
case IOPARM_type_large_io_int:
|
||||
case IOPARM_type_pint4:
|
||||
case IOPARM_type_parray:
|
||||
case IOPARM_type_pchar:
|
||||
|
@ -214,12 +216,15 @@ void
|
|||
gfc_build_io_library_fndecls (void)
|
||||
{
|
||||
tree types[IOPARM_type_num], pad_idx, gfc_int4_type_node;
|
||||
tree gfc_large_io_int_type_node;
|
||||
tree parm_type, dt_parm_type;
|
||||
tree gfc_c_int_type_node;
|
||||
HOST_WIDE_INT pad_size;
|
||||
enum ioparam_type ptype;
|
||||
|
||||
types[IOPARM_type_int4] = gfc_int4_type_node = gfc_get_int_type (4);
|
||||
types[IOPARM_type_large_io_int] = gfc_large_io_int_type_node
|
||||
= gfc_get_int_type (gfc_large_io_int_kind);
|
||||
types[IOPARM_type_pint4] = build_pointer_type (gfc_int4_type_node);
|
||||
types[IOPARM_type_parray] = pchar_type_node;
|
||||
types[IOPARM_type_pchar] = pchar_type_node;
|
||||
|
|
|
@ -93,6 +93,10 @@ int gfc_default_logical_kind;
|
|||
int gfc_default_complex_kind;
|
||||
int gfc_c_int_kind;
|
||||
|
||||
/* The kind size used for record offsets. If the target system supports
|
||||
kind=8, this will be set to 8, otherwise it is set to 4. */
|
||||
int gfc_large_io_int_kind;
|
||||
|
||||
/* Query the target to determine which machine modes are available for
|
||||
computation. Choose KIND numbers for them. */
|
||||
|
||||
|
@ -140,6 +144,17 @@ gfc_init_kinds (void)
|
|||
i_index += 1;
|
||||
}
|
||||
|
||||
/* Set the kind used to match GFC_LARGE_IO_INT in libgfortran. This is
|
||||
used for large file access. */
|
||||
|
||||
if (saw_i8)
|
||||
gfc_large_io_int_kind = 8;
|
||||
else
|
||||
gfc_large_io_int_kind = 4;
|
||||
|
||||
/* If we do not at least have kind = 4, everything is pointless. */
|
||||
gcc_assert(saw_i4);
|
||||
|
||||
/* Set the maximum integer kind. Used with at least BOZ constants. */
|
||||
gfc_max_integer_kind = gfc_integer_kinds[i_index - 1].kind;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue