The attached patch fixes an issue with pointer subtraction (wrong type).
Committed as Rev. 208919. Additionally I have merged the trunk into the branch, Rev. 208922. Tobias
Index: gcc/fortran/ChangeLog.fortran-caf =================================================================== --- gcc/fortran/ChangeLog.fortran-caf (Revision 208918) +++ gcc/fortran/ChangeLog.fortran-caf (Arbeitskopie) @@ -1,5 +1,9 @@ 2014-03-28 Tobias Burnus <bur...@net-b.de> + * trans-intrinsic.c (conv_caf_send): Fix offset calculation. + +2014-03-28 Tobias Burnus <bur...@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 Index: gcc/fortran/trans-intrinsic.c =================================================================== --- gcc/fortran/trans-intrinsic.c (Revision 208918) +++ gcc/fortran/trans-intrinsic.c (Arbeitskopie) @@ -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. */