diff mbox

[Fortran-CAF,committed] Fix an offset calculation - and merge from the trunk

Message ID 5335DF76.40104@net-b.de
State New
Headers show

Commit Message

Tobias Burnus March 28, 2014, 8:45 p.m. UTC
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
diff mbox

Patch

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  <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
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.  */