diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2017-01-13 21:53:16 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2017-01-13 21:53:16 +0200 |
commit | c1e9bbcc49c1b9f169c5911f3871f5df109bff9b (patch) | |
tree | bf815e2471d2b7f7e44d76a31e98cc1d05e07b34 /gcc/fortran/trans-stmt.c | |
parent | be4aa83d6ff4720fffd2c9f62c6e3082ece1937f (diff) | |
download | gcc-c1e9bbcc49c1b9f169c5911f3871f5df109bff9b.zip gcc-c1e9bbcc49c1b9f169c5911f3871f5df109bff9b.tar.gz gcc-c1e9bbcc49c1b9f169c5911f3871f5df109bff9b.tar.bz2 |
Revert r244448
From-SVN: r244454
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r-- | gcc/fortran/trans-stmt.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 6b52974..8560087 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -112,7 +112,7 @@ gfc_trans_label_assign (gfc_code * code) || code->label1->defined == ST_LABEL_DO_TARGET) { label_tree = gfc_build_addr_expr (pvoid_type_node, label_tree); - len_tree = build_int_cst (gfc_charlen_type_node, -1); + len_tree = integer_minus_one_node; } else { @@ -125,7 +125,7 @@ gfc_trans_label_assign (gfc_code * code) label_tree = gfc_build_addr_expr (pvoid_type_node, label_tree); } - gfc_add_modify (&se.pre, len, fold_convert (TREE_TYPE (len), len_tree)); + gfc_add_modify (&se.pre, len, len_tree); gfc_add_modify (&se.pre, addr, label_tree); return gfc_finish_block (&se.pre); @@ -2750,7 +2750,7 @@ gfc_trans_character_select (gfc_code *code) { for (d = cp; d; d = d->right) { - gfc_charlen_t i; + int i; if (d->low) { gcc_assert (d->low->expr_type == EXPR_CONSTANT @@ -2955,7 +2955,7 @@ gfc_trans_character_select (gfc_code *code) if (d->low == NULL) { CONSTRUCTOR_APPEND_ELT (node, ss_string1[k], null_pointer_node); - CONSTRUCTOR_APPEND_ELT (node, ss_string1_len[k], build_zero_cst (gfc_charlen_type_node)); + CONSTRUCTOR_APPEND_ELT (node, ss_string1_len[k], integer_zero_node); } else { @@ -2968,7 +2968,7 @@ gfc_trans_character_select (gfc_code *code) if (d->high == NULL) { CONSTRUCTOR_APPEND_ELT (node, ss_string2[k], null_pointer_node); - CONSTRUCTOR_APPEND_ELT (node, ss_string2_len[k], build_zero_cst (gfc_charlen_type_node)); + CONSTRUCTOR_APPEND_ELT (node, ss_string2_len[k], integer_zero_node); } else { @@ -5640,7 +5640,7 @@ gfc_trans_allocate (gfc_code * code) { gfc_init_se (&se, NULL); temp_var_needed = false; - expr3_len = build_zero_cst (gfc_charlen_type_node); + expr3_len = integer_zero_node; e3_is = E3_MOLD; } /* Prevent aliasing, i.e., se.expr may be already a @@ -6036,8 +6036,7 @@ gfc_trans_allocate (gfc_code * code) e.g., a string. */ memsz = fold_build2_loc (input_location, GT_EXPR, boolean_type_node, expr3_len, - build_zero_cst - (TREE_TYPE (expr3_len))); + integer_zero_node); memsz = fold_build3_loc (input_location, COND_EXPR, TREE_TYPE (expr3_esize), memsz, tmp, expr3_esize); @@ -6367,7 +6366,7 @@ gfc_trans_allocate (gfc_code * code) gfc_build_addr_expr (pchar_type_node, gfc_build_localized_cstring_const (msg))); - slen = build_int_cst (gfc_charlen_type_node, strlen (msg)); + slen = build_int_cst (gfc_charlen_type_node, ((int) strlen (msg))); dlen = gfc_get_expr_charlen (code->expr2); slen = fold_build2_loc (input_location, MIN_EXPR, TREE_TYPE (slen), dlen, slen); @@ -6649,7 +6648,7 @@ gfc_trans_deallocate (gfc_code *code) gfc_add_modify (&errmsg_block, errmsg_str, gfc_build_addr_expr (pchar_type_node, gfc_build_localized_cstring_const (msg))); - slen = build_int_cst (gfc_charlen_type_node, strlen (msg)); + slen = build_int_cst (gfc_charlen_type_node, ((int) strlen (msg))); dlen = gfc_get_expr_charlen (code->expr2); gfc_trans_string_copy (&errmsg_block, dlen, errmsg, code->expr2->ts.kind, |