For those with a broken crystal ball (and being too lazy to look in the repository), here's the attachment.

Tobias Burnus:
A rather obvious copy and paste error ...
Committed as Rev. 210309.

Index: libgfortran/ChangeLog.fortran-caf
===================================================================
--- libgfortran/ChangeLog.fortran-caf	(Revision 210258)
+++ libgfortran/ChangeLog.fortran-caf	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2014-05-11  Tobias Burnus  <bur...@net-b.de>
+
+	* caf/single.c (_gfortran_caf_get_desc,
+	 _gfortran_caf_send_desc): Fix stride calculation.
+
 2014-04-20  Tobias Burnus  <bur...@net-b.de>
 
 	* caf/libcaf.h (_gfortran_caf_co_sum, _gfortran_caf_co_min,
Index: libgfortran/caf/single.c
===================================================================
--- libgfortran/caf/single.c	(Revision 210259)
+++ libgfortran/caf/single.c	(Arbeitskopie)
@@ -214,7 +214,7 @@ _gfortran_caf_get_desc (caf_token_t token, size_t
 	  extent = (src->dim[j]._ubound - src->dim[j].lower_bound + 1);
 	  stride = src->dim[j]._stride;
 	}
-      array_offset_sr += (i / extent) * dest->dim[rank-1]._stride;
+      array_offset_sr += (i / extent) * src->dim[rank-1]._stride;
 
       void *sr = (void *)((char *) TOKEN (token) + offset
 			   + array_offset_sr*GFC_DESCRIPTOR_SIZE (src));
@@ -290,7 +290,7 @@ _gfortran_caf_send_desc (caf_token_t token, size_t
 	  extent = (src->dim[j]._ubound - src->dim[j].lower_bound + 1);
 	  stride = src->dim[j]._stride;
 	}
-      array_offset_sr += (i / extent) * dest->dim[rank-1]._stride;
+      array_offset_sr += (i / extent) * src->dim[rank-1]._stride;
 
       void *dst = (void *)((char *) TOKEN (token) + offset
 			   + array_offset_dst*GFC_DESCRIPTOR_SIZE (dest));

Reply via email to