+2018-09-21 Andrew Stubbs <ams@codesourcery.com>
+ Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
+ argument of a call to _gfortran_caf_register is of size_type_node.
+ * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
+ index to a size_type_node type.
+ * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
+
2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
* gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
suffices to recognize the data as array. */
if (rank < 0)
rank = 1;
- size = integer_zero_node;
+ size = build_zero_cst (size_type_node);
desc = field;
gfc_add_modify (&block, gfc_conv_descriptor_rank (desc),
build_int_cst (signed_char_type_node, rank));
tmp = fold_build2_loc (input_location, MULT_EXPR,
integer_type_node, extent, tmp);
index = fold_build2_loc (input_location, PLUS_EXPR,
- integer_type_node, index, tmp);
+ gfc_array_index_type, index,
+ fold_convert (gfc_array_index_type,
+ tmp));
if (i < ar->dimen - 1)
{
ubound = gfc_conv_descriptor_ubound_get (desc, gfc_rank_cst[i]);
stat = gfc_create_var (integer_type_node, "stat");
}
+ index = fold_convert (size_type_node, index);
tmp = build_call_expr_loc (input_location, gfor_fndecl_caf_event_query, 5,
token, index, image_index, count
? gfc_build_addr_expr (NULL, count) : count,
tmp = fold_build2_loc (input_location, MULT_EXPR,
integer_type_node, extent, tmp);
index = fold_build2_loc (input_location, PLUS_EXPR,
- integer_type_node, index, tmp);
+ gfc_array_index_type, index,
+ fold_convert (gfc_array_index_type, tmp));
if (i < ar->dimen - 1)
{
ubound = gfc_conv_descriptor_ubound_get (desc, gfc_rank_cst[i]);
stat = gfc_create_var (integer_type_node, "stat");
}
+ index = fold_convert (size_type_node, index);
if (op == EXEC_EVENT_POST)
tmp = build_call_expr_loc (input_location, gfor_fndecl_caf_event_post, 6,
token, index, image_index,