aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-io.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-04 13:18:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-04 13:18:34 +0000
commitdf09d1d51c9d0a5e8df630870b51dd96bcdc2325 (patch)
tree7edd68ae3ca4afd68e43a1be0427b04cd892f89c /gcc/fortran/trans-io.c
parentfdabf26955aeaf884a8824d376b56e00effa7485 (diff)
downloadgcc-df09d1d51c9d0a5e8df630870b51dd96bcdc2325.zip
gcc-df09d1d51c9d0a5e8df630870b51dd96bcdc2325.tar.gz
gcc-df09d1d51c9d0a5e8df630870b51dd96bcdc2325.tar.bz2
trans-array.c (gfc_trans_array_constructor_value): Use size_int for bounds of range types.
2011-05-04 Richard Guenther <rguenther@suse.de> * trans-array.c (gfc_trans_array_constructor_value): Use size_int for bounds of range types. (gfc_trans_array_constructor_value): Use size_type_node for memcpy argument. * trans-common.c (build_field): Use gfc_charlen_type_node for lengths. * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL as type to build_int_cst. * trans-const.c (gfc_build_string_const): Use size_int for bounds of range types. (gfc_build_wide_string_const): Likewise. * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node for lengths. (gfc_trans_character_select): Likewise. (gfc_trans_character_select): Do not pass NULL as type to build_int_cst. (gfc_trans_character_select): Use size_int for bounds of range types. * trans-io.c (gfc_build_io_library_fndecls): Likewise. (add_case): Do not pass NULL as type to build_int_cst. (transfer_expr): Likewise. (transfer_array_desc): Likewise. * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node for lengths. (gfc_trans_assign_aux_var): Likewise. (create_main_function): Use size_int for bounds of range types. * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass NULL as type to build_int_cst. (gfc_conv_intrinsic_spacing): Likewise. (gfc_conv_intrinsic_rrspacing): Likewise. (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths. From-SVN: r173374
Diffstat (limited to 'gcc/fortran/trans-io.c')
-rw-r--r--gcc/fortran/trans-io.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 8021bc6..07df5d8 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -295,7 +295,7 @@ gfc_build_io_library_fndecls (void)
types[IOPARM_type_pchar] = pchar_type_node;
pad_size = 16 * TREE_INT_CST_LOW (TYPE_SIZE_UNIT (pchar_type_node));
pad_size += 32 * TREE_INT_CST_LOW (TYPE_SIZE_UNIT (integer_type_node));
- pad_idx = build_index_type (build_int_cst (NULL_TREE, pad_size - 1));
+ pad_idx = build_index_type (size_int (pad_size - 1));
types[IOPARM_type_pad] = build_array_type (char_type_node, pad_idx);
/* pad actually contains pointers and integers so it needs to have an
@@ -826,7 +826,7 @@ add_case (int label_value, gfc_st_label * label, stmtblock_t * body)
if (label == NULL)
return; /* No label, no case */
- value = build_int_cst (NULL_TREE, label_value);
+ value = build_int_cst (integer_type_node, label_value);
/* Make a backend label for this case. */
tmp = gfc_build_label_decl (NULL_TREE);
@@ -2051,7 +2051,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
switch (ts->type)
{
case BT_INTEGER:
- arg2 = build_int_cst (NULL_TREE, kind);
+ arg2 = build_int_cst (integer_type_node, kind);
if (last_dt == READ)
function = iocall[IOCALL_X_INTEGER];
else
@@ -2060,7 +2060,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
break;
case BT_REAL:
- arg2 = build_int_cst (NULL_TREE, kind);
+ arg2 = build_int_cst (integer_type_node, kind);
if (last_dt == READ)
{
if (gfc_real16_is_float128 && ts->kind == 16)
@@ -2079,7 +2079,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
break;
case BT_COMPLEX:
- arg2 = build_int_cst (NULL_TREE, kind);
+ arg2 = build_int_cst (integer_type_node, kind);
if (last_dt == READ)
{
if (gfc_real16_is_float128 && ts->kind == 16)
@@ -2098,7 +2098,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
break;
case BT_LOGICAL:
- arg2 = build_int_cst (NULL_TREE, kind);
+ arg2 = build_int_cst (integer_type_node, kind);
if (last_dt == READ)
function = iocall[IOCALL_X_LOGICAL];
else
@@ -2119,7 +2119,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
arg2 = TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (tmp)));
arg2 = fold_convert (gfc_charlen_type_node, arg2);
}
- arg3 = build_int_cst (NULL_TREE, kind);
+ arg3 = build_int_cst (integer_type_node, kind);
if (last_dt == READ)
function = iocall[IOCALL_X_CHARACTER_WIDE];
else
@@ -2203,9 +2203,9 @@ transfer_array_desc (gfc_se * se, gfc_typespec * ts, tree addr_expr)
if (ts->type == BT_CHARACTER)
charlen_arg = se->string_length;
else
- charlen_arg = build_int_cst (NULL_TREE, 0);
+ charlen_arg = build_int_cst (gfc_charlen_type_node, 0);
- kind_arg = build_int_cst (NULL_TREE, ts->kind);
+ kind_arg = build_int_cst (integer_type_node, ts->kind);
tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
if (last_dt == READ)