int index;
tree type;
unsigned n;
- unsigned HOST_WIDE_INT hi;
- unsigned HOST_WIDE_INT lo;
/* Create and name the types. */
#define PUSH_TYPE(name, node) \
descriptor. */
n = TYPE_PRECISION (gfc_array_index_type) - GFC_DTYPE_SIZE_SHIFT;
- lo = ~ (unsigned HOST_WIDE_INT) 0;
- if (n > HOST_BITS_PER_WIDE_INT)
- hi = lo >> (2*HOST_BITS_PER_WIDE_INT - n);
- else
- hi = 0, lo >>= HOST_BITS_PER_WIDE_INT - n;
gfc_max_array_element_size
- = build_int_cst_wide (long_unsigned_type_node, lo, hi);
+ = wide_int_to_tree (long_unsigned_type_node,
+ wi::mask (n, UNSIGNED,
+ TYPE_PRECISION (long_unsigned_type_node)));
boolean_type_node = gfc_get_logical_type (gfc_default_logical_kind);
boolean_true_node = build_int_cst (boolean_type_node, 1);
if (stride)
rtype = build_range_type (gfc_array_index_type, gfc_index_zero_node,
int_const_binop (MINUS_EXPR, stride,
- integer_one_node));
+ build_int_cst (TREE_TYPE (stride), 1)));
else
rtype = gfc_array_range_type;
arraytype = build_array_type (etype, rtype);