diff options
author | Richard Guenther <rguenther@suse.de> | 2011-05-04 13:18:34 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-05-04 13:18:34 +0000 |
commit | df09d1d51c9d0a5e8df630870b51dd96bcdc2325 (patch) | |
tree | 7edd68ae3ca4afd68e43a1be0427b04cd892f89c /gcc/fortran/trans-stmt.c | |
parent | fdabf26955aeaf884a8824d376b56e00effa7485 (diff) | |
download | gcc-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-stmt.c')
-rw-r--r-- | gcc/fortran/trans-stmt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 7e08e8d..9147d88 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -119,7 +119,7 @@ gfc_trans_label_assign (gfc_code * code) gfc_expr *format = code->label1->format; label_len = format->value.character.length; - len_tree = build_int_cst (NULL_TREE, label_len); + len_tree = build_int_cst (gfc_charlen_type_node, label_len); label_tree = gfc_build_wide_string_const (format->ts.kind, label_len + 1, format->value.character.string); label_tree = gfc_build_addr_expr (pvoid_type_node, label_tree); @@ -2131,7 +2131,8 @@ gfc_trans_character_select (gfc_code *code) tmp = fold_build3_loc (input_location, CASE_LABEL_EXPR, void_type_node, (d->low == NULL && d->high == NULL) - ? NULL : build_int_cst (NULL_TREE, d->n), + ? NULL : build_int_cst (integer_type_node, + d->n), NULL, label); gfc_add_expr_to_block (&body, tmp); } @@ -2185,7 +2186,7 @@ gfc_trans_character_select (gfc_code *code) } type = build_array_type (select_struct[k], - build_index_type (build_int_cst (NULL_TREE, n-1))); + build_index_type (size_int (n-1))); init = build_constructor (type, inits); TREE_CONSTANT (init) = 1; @@ -2209,7 +2210,8 @@ gfc_trans_character_select (gfc_code *code) gcc_unreachable (); tmp = build_call_expr_loc (input_location, - fndecl, 4, init, build_int_cst (NULL_TREE, n), + fndecl, 4, init, + build_int_cst (gfc_charlen_type_node, n), expr1se.expr, expr1se.string_length); case_num = gfc_create_var (integer_type_node, "case_num"); gfc_add_modify (&block, case_num, tmp); |