===================================================================
@@ -1,3 +1,8 @@
2014-04-06 Tobias Burnus <burnus@net-b.de>
+ * gfortran.dg/coarray/send_array.f90: Fix support
+ for num_images() > 1.
+
+2014-04-06 Tobias Burnus <burnus@net-b.de>
+
* gfortran.dg/coarray/send_array.f90: New.
===================================================================
@@ -37,7 +37,7 @@ subroutine one(lb1, lb2)
a(:,:) = b(lb1, lb2)
sync all
if (this_image() == 1) then
- caf(:,:)[this_image()] = b(lb1, lb2)
+ caf(:,:)[num_images()] = b(lb1, lb2)
end if
sync all
if (this_image() == num_images()) then
@@ -51,7 +51,7 @@ subroutine one(lb1, lb2)
a(:,:) = b(:, :)
sync all
if (this_image() == 1) then
- caf(:,:)[this_image()] = b(:, :)
+ caf(:,:)[num_images()] = b(:, :)
end if
sync all
if (this_image() == num_images()) then
@@ -74,7 +74,8 @@ subroutine one(lb1, lb2)
a(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2) = b(lb1, lb2)
sync all
if (this_image() == 1) then
- caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[1] = b(lb1, lb2)
+ caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()] &
+ = b(lb1, lb2)
end if
sync all
@@ -85,7 +86,7 @@ subroutine one(lb1, lb2)
= b(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)
sync all
if (this_image() == 1) then
- caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[1] &
+ caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()] &
= b(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)
end if
sync all