diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/fortran/trans-array.c | 4 | ||||
-rw-r--r-- | gcc/fortran/trans-const.c | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 8 | ||||
-rw-r--r-- | gcc/fortran/trans-io.c | 14 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 10 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 11 | ||||
-rw-r--r-- | gcc/fortran/trans.c | 2 |
9 files changed, 49 insertions, 31 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d4d9d00..0d2f8b6 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,20 @@ +2004-08-25 Nathan Sidwell <nathan@codesourcery.com> + + * trans-array.c (gfc_trans_array_constructor_value): Adjust + build_int_cst calls. + * trans-const.c (gfc_build_string_const, gfc_init_constants, + gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise. + * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks, + gfc_trans_entry_master_switch): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_ibits, + gfc_conv_intrinsic_len, prepare_arg_info): Likewise. + * trans-io.c (add_case, set_error_locus, + transfer_namelist_element, transfer_expr): Likewise. + * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, + gfc_trans_stop, gfc_trans_character_select): Likewise. + * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. + * trans.c (gfc_trans_runtime_check): Likewise. + 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> * trans-decl.c, trans-types.c: Add and remove blank lines as @@ -22,7 +39,7 @@ 2004-08-24 Nathan Sidwell <nathan@codesourcery.com> - * fortran/f95-lang.c (gfc_init_decl_processing): Adjust + * f95-lang.c (gfc_init_decl_processing): Adjust build_common_tree_nodes call. 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index e6c4600..f79ab1e 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -796,7 +796,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, p = p->next; } - bound = build_int_cst (NULL_TREE, n - 1, 0); + bound = build_int_cst (NULL_TREE, n - 1); /* Create an array type to hold them. */ tmptype = build_range_type (gfc_array_index_type, gfc_index_zero_node, bound); @@ -821,7 +821,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, init = gfc_build_addr_expr (NULL, init); size = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (type)); - bound = build_int_cst (NULL_TREE, n * size, 0); + bound = build_int_cst (NULL_TREE, n * size); tmp = gfc_chainon_list (NULL_TREE, tmp); tmp = gfc_chainon_list (tmp, init); tmp = gfc_chainon_list (tmp, bound); diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c index 110c0db..2f485a7 100644 --- a/gcc/fortran/trans-const.c +++ b/gcc/fortran/trans-const.c @@ -82,7 +82,7 @@ gfc_build_string_const (int length, const char *s) tree len; str = build_string (length, s); - len = build_int_cst (NULL_TREE, length, 0); + len = build_int_cst (NULL_TREE, length); TREE_TYPE (str) = build_array_type (gfc_character1_type_node, build_range_type (gfc_strlen_type_node, @@ -146,7 +146,7 @@ gfc_init_constants (void) int n; for (n = 0; n <= GFC_MAX_DIMENSIONS; n++) - gfc_rank_cst[n] = build_int_cst (gfc_array_index_type, n, 0); + gfc_rank_cst[n] = build_int_cst (gfc_array_index_type, n); gfc_strconst_bounds = gfc_build_string_const (21, "Array bound mismatch"); @@ -315,7 +315,7 @@ gfc_conv_constant_to_tree (gfc_expr * expr) return gfc_conv_mpfr_to_tree (expr->value.real, expr->ts.kind); case BT_LOGICAL: - return build_int_cst (NULL_TREE, expr->value.logical, 0); + return build_int_cst (NULL_TREE, expr->value.logical); case BT_COMPLEX: { diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 76618b2..7188905 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -790,7 +790,7 @@ gfc_get_symbol_decl (gfc_symbol * sym) ASSIGN_ADDR can not be used. Equal -1 means that ASSIGN_ADDR is the target label's address. Other value is the length of format string and ASSIGN_ADDR is the address of format string. */ - DECL_INITIAL (length) = build_int_cst (NULL_TREE, -2, -1); + DECL_INITIAL (length) = build_int_cst (NULL_TREE, -2); } if (sym->ts.type == BT_CHARACTER) @@ -1346,7 +1346,7 @@ build_entry_thunks (gfc_namespace * ns) gfc_start_block (&body); /* Pass extra parameter identifying this entry point. */ - tmp = build_int_cst (gfc_array_index_type, el->id, 0); + tmp = build_int_cst (gfc_array_index_type, el->id); args = tree_cons (NULL_TREE, tmp, NULL_TREE); string_args = NULL_TREE; @@ -2113,7 +2113,7 @@ gfc_trans_entry_master_switch (gfc_entry_list * el) /* Add the case label. */ label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); DECL_CONTEXT (label) = current_function_decl; - val = build_int_cst (gfc_array_index_type, el->id, 0); + val = build_int_cst (gfc_array_index_type, el->id); tmp = build_v (CASE_LABEL_EXPR, val, NULL_TREE, label); gfc_add_expr_to_block (&block, tmp); diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 1a8a8b6..cfe3051 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -1760,7 +1760,7 @@ gfc_conv_intrinsic_ibits (gfc_se * se, gfc_expr * expr) arg2 = TREE_VALUE (arg2); type = TREE_TYPE (arg); - mask = build_int_cst (NULL_TREE, -1, ~(unsigned HOST_WIDE_INT) 0); + mask = build_int_cst (NULL_TREE, -1); mask = build (LSHIFT_EXPR, type, mask, arg3); mask = build1 (BIT_NOT_EXPR, type, mask); @@ -1884,7 +1884,7 @@ gfc_conv_intrinsic_len (gfc_se * se, gfc_expr * expr) switch (arg->expr_type) { case EXPR_CONSTANT: - len = build_int_cst (NULL_TREE, arg->value.character.length, 0); + len = build_int_cst (NULL_TREE, arg->value.character.length); break; default: @@ -2329,9 +2329,9 @@ void prepare_arg_info (gfc_se * se, gfc_expr * expr, /* Caculate the numbers of bits of exponent, fraction and word */ n = gfc_validate_kind (a1->ts.type, a1->ts.kind); - tmp = build_int_cst (NULL_TREE, gfc_real_kinds[n].digits - 1, 0); + tmp = build_int_cst (NULL_TREE, gfc_real_kinds[n].digits - 1); rcs->fdigits = convert (masktype, tmp); - wbits = build_int_cst (NULL_TREE, TYPE_PRECISION (rcs->type) - 1, 0); + wbits = build_int_cst (NULL_TREE, TYPE_PRECISION (rcs->type) - 1); wbits = convert (masktype, wbits); rcs->edigits = fold (build (MINUS_EXPR, masktype, wbits, tmp)); diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index 63d5618..3d04332 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -451,7 +451,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, 0); + value = build_int_cst (NULL_TREE, label_value); /* Make a backend label for this case. */ tmp = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -524,7 +524,7 @@ set_error_locus (stmtblock_t * block, locus * where) gfc_add_modify_expr (block, locus_file, tmp); line = where->lb->linenum; - gfc_add_modify_expr (block, locus_line, build_int_cst (NULL_TREE, line, 0)); + gfc_add_modify_expr (block, locus_line, build_int_cst (NULL_TREE, line)); } @@ -896,7 +896,7 @@ transfer_namelist_element (stmtblock_t * block, gfc_typespec * ts, tree addr_exp args = gfc_chainon_list (NULL_TREE, addr_expr); args = gfc_chainon_list (args, string); args = gfc_chainon_list (args, string_length); - arg2 = build_int_cst (gfc_array_index_type, ts->kind, 0); + arg2 = build_int_cst (gfc_array_index_type, ts->kind); args = gfc_chainon_list (args,arg2); switch (ts->type) @@ -1152,22 +1152,22 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr) switch (ts->type) { case BT_INTEGER: - arg2 = build_int_cst (NULL_TREE, kind, 0); + arg2 = build_int_cst (NULL_TREE, kind); function = iocall_x_integer; break; case BT_REAL: - arg2 = build_int_cst (NULL_TREE, kind, 0); + arg2 = build_int_cst (NULL_TREE, kind); function = iocall_x_real; break; case BT_COMPLEX: - arg2 = build_int_cst (NULL_TREE, kind, 0); + arg2 = build_int_cst (NULL_TREE, kind); function = iocall_x_complex; break; case BT_LOGICAL: - arg2 = build_int_cst (NULL_TREE, kind, 0); + arg2 = build_int_cst (NULL_TREE, kind); function = iocall_x_logical; break; diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index dbe4422..3b89107 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -113,7 +113,7 @@ gfc_trans_label_assign (gfc_code * code) { label_str = code->label->format->value.character.string; label_len = code->label->format->value.character.length; - len_tree = build_int_cst (NULL_TREE, label_len, 0); + len_tree = build_int_cst (NULL_TREE, label_len); label_tree = gfc_build_string_const (label_len + 1, label_str); label_tree = gfc_build_addr_expr (pchar_type_node, label_tree); } @@ -287,7 +287,7 @@ gfc_trans_pause (gfc_code * code) if (code->expr == NULL) { - tmp = build_int_cst (gfc_int4_type_node, code->ext.stop_code, 0); + tmp = build_int_cst (gfc_int4_type_node, code->ext.stop_code); args = gfc_chainon_list (NULL_TREE, tmp); fndecl = gfor_fndecl_pause_numeric; } @@ -326,7 +326,7 @@ gfc_trans_stop (gfc_code * code) if (code->expr == NULL) { - tmp = build_int_cst (gfc_int4_type_node, code->ext.stop_code, 0); + tmp = build_int_cst (gfc_int4_type_node, code->ext.stop_code); args = gfc_chainon_list (NULL_TREE, tmp); fndecl = gfor_fndecl_stop_numeric; } @@ -1100,7 +1100,7 @@ gfc_trans_character_select (gfc_code *code) } type = build_array_type (select_struct, build_index_type - (build_int_cst (NULL_TREE, n - 1, 0))); + (build_int_cst (NULL_TREE, n - 1))); init = build1 (CONSTRUCTOR, type, nreverse(init)); TREE_CONSTANT (init) = 1; @@ -1118,7 +1118,7 @@ gfc_trans_character_select (gfc_code *code) init = gfc_build_addr_expr (pvoid_type_node, init); args = gfc_chainon_list (NULL_TREE, init); - tmp = build_int_cst (NULL_TREE, n, 0); + tmp = build_int_cst (NULL_TREE, n); args = gfc_chainon_list (args, tmp); tmp = gfc_build_addr_expr (pvoid_type_node, end_label); diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index f96dc28..6f96315 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -168,13 +168,14 @@ gfc_init_types (void) hi = 0; lo = (~(unsigned HOST_WIDE_INT) 0) >> (sizeof (HOST_WIDE_INT) * 8 - n); } - gfc_max_array_element_size = build_int_cst (long_unsigned_type_node, lo, hi); + gfc_max_array_element_size + = build_int_cst_wide (long_unsigned_type_node, lo, hi); size_type_node = gfc_array_index_type; boolean_type_node = gfc_get_logical_type (gfc_default_logical_kind ()); - boolean_true_node = build_int_cst (boolean_type_node, 1, 0); - boolean_false_node = build_int_cst (boolean_type_node, 0, 0); + boolean_true_node = build_int_cst (boolean_type_node, 1); + boolean_false_node = build_int_cst (boolean_type_node, 0); } /* Get a type node for an integer kind. */ @@ -597,11 +598,11 @@ gfc_get_dtype (tree type, int rank) i += TREE_INT_CST_LOW (size) << GFC_DTYPE_SIZE_SHIFT; } - dtype = build_int_cst (gfc_array_index_type, i, 0); + dtype = build_int_cst (gfc_array_index_type, i); if (size && !INTEGER_CST_P (size)) { - tmp = build_int_cst (gfc_array_index_type, GFC_DTYPE_SIZE_SHIFT, 0); + tmp = build_int_cst (gfc_array_index_type, GFC_DTYPE_SIZE_SHIFT); tmp = fold (build (LSHIFT_EXPR, gfc_array_index_type, size, tmp)); dtype = fold (build (PLUS_EXPR, gfc_array_index_type, tmp, dtype)); } diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index 1ac8931..16ef85c 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -365,7 +365,7 @@ gfc_trans_runtime_check (tree cond, tree msg, stmtblock_t * pblock) tmp = gfc_build_addr_expr (pchar_type_node, gfc_strconst_current_filename); args = gfc_chainon_list (args, tmp); - tmp = build_int_cst (NULL_TREE, input_line, 0); + tmp = build_int_cst (NULL_TREE, input_line); args = gfc_chainon_list (args, tmp); tmp = gfc_build_function_call (gfor_fndecl_runtime_error, args); |