cond = build2 (up ? GE_EXPR : LE_EXPR, boolean_type_node, tmp, arg);
tmp = build2 (up ? PLUS_EXPR : MINUS_EXPR, type, intval,
- convert (type, integer_one_node));
+ build_int_cst (type, 1));
tmp = build3 (COND_EXPR, type, cond, intval, tmp);
return tmp;
}
{
bound = gfc_evaluate_now (bound, &se->pre);
cond = fold (build2 (LT_EXPR, boolean_type_node,
- bound, convert (TREE_TYPE (bound),
- integer_zero_node)));
+ bound, build_int_cst (TREE_TYPE (bound), 0)));
tmp = gfc_rank_cst[GFC_TYPE_ARRAY_RANK (TREE_TYPE (desc))];
tmp = fold (build2 (GE_EXPR, boolean_type_node, bound, tmp));
cond = fold(build2 (TRUTH_ORIF_EXPR, boolean_type_node, cond, tmp));
gfc_add_block_to_block (&body, &arrayse.pre);
tmp = build2 (op, boolean_type_node, arrayse.expr,
- fold_convert (TREE_TYPE (arrayse.expr),
- integer_zero_node));
+ build_int_cst (TREE_TYPE (arrayse.expr), 0));
tmp = build3_v (COND_EXPR, tmp, found, build_empty_stmt ());
gfc_add_expr_to_block (&body, tmp);
gfc_add_block_to_block (&body, &arrayse.post);
type = gfc_typenode_for_spec (&expr->ts);
/* Initialize the result. */
resvar = gfc_create_var (type, "count");
- gfc_add_modify_expr (&se->pre, resvar, convert (type, integer_zero_node));
+ gfc_add_modify_expr (&se->pre, resvar, build_int_cst (type, 0));
/* Walk the arguments. */
arrayss = gfc_walk_expr (actual->expr);
gfc_start_scalarized_body (&loop, &body);
tmp = build2 (PLUS_EXPR, TREE_TYPE (resvar), resvar,
- convert (TREE_TYPE (resvar), integer_one_node));
+ build_int_cst (TREE_TYPE (resvar), 1));
tmp = build2_v (MODIFY_EXPR, resvar, tmp);
gfc_init_se (&arrayse, NULL);
arg = TREE_VALUE (arg);
type = TREE_TYPE (arg);
- tmp = build2 (LSHIFT_EXPR, type, convert (type, integer_one_node), arg2);
+ tmp = build2 (LSHIFT_EXPR, type, build_int_cst (type, 1), arg2);
tmp = build2 (BIT_AND_EXPR, type, arg, tmp);
tmp = fold (build2 (NE_EXPR, boolean_type_node, tmp,
- convert (type, integer_zero_node)));
+ build_int_cst (type, 0)));
type = gfc_typenode_for_spec (&expr->ts);
se->expr = convert (type, tmp);
}
arg = TREE_VALUE (arg);
type = TREE_TYPE (arg);
- tmp = fold (build2 (LSHIFT_EXPR, type,
- convert (type, integer_one_node), arg2));
+ tmp = fold (build2 (LSHIFT_EXPR, type, build_int_cst (type, 1), arg2));
if (set)
op = BIT_IOR_EXPR;
else
tree tmp;
tree lrot;
tree rrot;
+ tree zero;
arg = gfc_conv_intrinsic_function_args (se, expr);
arg2 = TREE_CHAIN (arg);
tmp = fold (build1 (NEGATE_EXPR, TREE_TYPE (arg2), arg2));
rrot = fold (build2 (RROTATE_EXPR, type, arg, tmp));
- tmp = fold (build2 (GT_EXPR, boolean_type_node, arg2,
- convert (TREE_TYPE (arg2), integer_zero_node)));
+ zero = build_int_cst (TREE_TYPE (arg2), 0);
+ tmp = fold (build2 (GT_EXPR, boolean_type_node, arg2, zero));
rrot = fold (build3 (COND_EXPR, type, tmp, lrot, rrot));
/* Do nothing if shift == 0. */
- tmp = fold (build2 (EQ_EXPR, boolean_type_node, arg2,
- convert (TREE_TYPE (arg2), integer_zero_node)));
+ tmp = fold (build2 (EQ_EXPR, boolean_type_node, arg2, zero));
se->expr = fold (build3 (COND_EXPR, type, tmp, arg, rrot));
}
type = gfc_typenode_for_spec (&expr->ts);
se->expr = build2 (op, type, se->expr,
- convert (TREE_TYPE (se->expr), integer_zero_node));
+ build_int_cst (TREE_TYPE (se->expr), 0));
}
/* Generate a call to the adjustl/adjustr library function. */
cond2 = build2 (EQ_EXPR, boolean_type_node, rcs.frac, zero);
cond = build2 (TRUTH_ANDIF_EXPR, boolean_type_node, cond, cond2);
tmp = build3 (COND_EXPR, masktype, cond,
- convert (masktype, integer_zero_node), tmp);
+ build_int_cst (masktype, 0), tmp);
tmp = build1 (VIEW_CONVERT_EXPR, rcs.type, tmp);
se->expr = tmp;
/* Free the temporary afterwards, if necessary. */
cond = build2 (GT_EXPR, boolean_type_node, len,
- convert (TREE_TYPE (len), integer_zero_node));
+ build_int_cst (TREE_TYPE (len), 0));
arglist = gfc_chainon_list (NULL_TREE, var);
tmp = gfc_build_function_call (gfor_fndecl_internal_free, arglist);
tmp = build3_v (COND_EXPR, cond, tmp, build_empty_stmt ());
tmp = fold_convert (type, tmp);
if (args_only)
- tmp = build2 (MINUS_EXPR, type, tmp, convert (type, integer_one_node));
+ tmp = build2 (MINUS_EXPR, type, tmp, build_int_cst (type, 1));
se->expr = tmp;
}