===================================================================
@@ -1,5 +1,9 @@
2014-03-28 Tobias Burnus <burnus@net-b.de>
+ * trans-intrinsic.c (conv_caf_send): Fix offset calculation.
+
+2014-03-28 Tobias Burnus <burnus@net-b.de>
+
* trans-intrinsic.c (caf_get_image_index, conv_caf_send): New.
(gfc_conv_intrinsic_subroutine): Call it.
* resolve.c (resolve_ordinary_assign): Enable coindex LHS
===================================================================
@@ -7942,7 +7942,8 @@ conv_caf_send (gfc_code *code) {
}
offset = fold_build2_loc (input_location, MINUS_EXPR, gfc_array_index_type,
- offset, tmp);
+ fold_convert (gfc_array_index_type, offset),
+ fold_convert (gfc_array_index_type, tmp));
/* RHS - a noncoarray. */