aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-intrinsic.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-intrinsic.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-intrinsic.c')
-rw-r--r--gcc/fortran/trans-intrinsic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 10dadf7..fd538bf 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -2213,8 +2213,8 @@ gfc_conv_intrinsic_minmax_char (gfc_se * se, gfc_expr * expr, int op)
args[0] = gfc_build_addr_expr (NULL_TREE, len);
var = gfc_create_var (gfc_get_pchar_type (expr->ts.kind), "pstr");
args[1] = gfc_build_addr_expr (ppvoid_type_node, var);
- args[2] = build_int_cst (NULL_TREE, op);
- args[3] = build_int_cst (NULL_TREE, nargs / 2);
+ args[2] = build_int_cst (integer_type_node, op);
+ args[3] = build_int_cst (integer_type_node, nargs / 2);
if (expr->ts.kind == 1)
function = gfor_fndecl_string_minmax;
@@ -4420,7 +4420,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);
+ len = build_int_cst (gfc_charlen_type_node, arg->value.character.length);
break;
case EXPR_ARRAY:
@@ -4766,8 +4766,8 @@ gfc_conv_intrinsic_spacing (gfc_se * se, gfc_expr * expr)
stmtblock_t block;
k = gfc_validate_kind (BT_REAL, expr->ts.kind, false);
- prec = build_int_cst (NULL_TREE, gfc_real_kinds[k].digits);
- emin = build_int_cst (NULL_TREE, gfc_real_kinds[k].min_exponent - 1);
+ prec = build_int_cst (integer_type_node, gfc_real_kinds[k].digits);
+ emin = build_int_cst (integer_type_node, gfc_real_kinds[k].min_exponent - 1);
tiny = gfc_conv_mpfr_to_tree (gfc_real_kinds[k].tiny, expr->ts.kind, 0);
frexp = gfc_builtin_decl_for_float_kind (BUILT_IN_FREXP, expr->ts.kind);
@@ -4850,7 +4850,7 @@ gfc_conv_intrinsic_rrspacing (gfc_se * se, gfc_expr * expr)
gfc_add_expr_to_block (&block, tmp);
tmp = fold_build2_loc (input_location, MINUS_EXPR, integer_type_node,
- build_int_cst (NULL_TREE, prec), e);
+ build_int_cst (integer_type_node, prec), e);
tmp = build_call_expr_loc (input_location, scalbn, 2, x, tmp);
gfc_add_modify (&block, x, tmp);
stmt = gfc_finish_block (&block);