* [patch, fortran, testsuite, committed] Fix some more coarray stuff
@ 2020-12-20 15:24 Thomas König
0 siblings, 0 replies; only message in thread
From: Thomas König @ 2020-12-20 15:24 UTC (permalink / raw)
To: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
Hi,
I have just committed the attached patch to a test case that
was failing on the shared coarray branch.
Again, the person who wrote the test case depended on only
running on a single image :-)
Best regards
Thomas
Correct coarray indices for test case.
gcc/testsuite/ChangeLog:
* gfortran.dg/coarray/send_char_array_1.f90: Correct coarray
indces.
[-- Attachment #2: p1.diff --]
[-- Type: text/x-patch, Size: 1784 bytes --]
diff --git a/gcc/testsuite/gfortran.dg/coarray/send_char_array_1.f90 b/gcc/testsuite/gfortran.dg/coarray/send_char_array_1.f90
index 3e16fa83685..b3caf80b1ad 100644
--- a/gcc/testsuite/gfortran.dg/coarray/send_char_array_1.f90
+++ b/gcc/testsuite/gfortran.dg/coarray/send_char_array_1.f90
@@ -25,28 +25,28 @@ program send_convert_char_array
allocate(character(kind=4, len=5)::co_str_k4_arr(4)[*])
! First check send/copy to self
- co_str_k1_scal[1] = str_k1_scal
+ co_str_k1_scal[this_image()] = str_k1_scal
if (co_str_k1_scal /= str_k1_scal // ' ') STOP 1
- co_str_k4_scal[1] = str_k4_scal
+ co_str_k4_scal[this_image()] = str_k4_scal
if (co_str_k4_scal /= str_k4_scal // 4_' ') STOP 2
- co_str_k4_scal[1] = str_k1_scal
+ co_str_k4_scal[this_image()] = str_k1_scal
if (co_str_k4_scal /= str_k4_scal // 4_' ') STOP 3
- co_str_k1_scal[1] = str_k4_scal
+ co_str_k1_scal[this_image()] = str_k4_scal
if (co_str_k1_scal /= str_k1_scal // ' ') STOP 4
- co_str_k1_arr(:)[1] = str_k1_arr
+ co_str_k1_arr(:)[this_image()] = str_k1_arr
if (any(co_str_k1_arr /= ['abc ', 'EFG ', 'klm ', 'NOP '])) STOP 5
- co_str_k4_arr(:)[1] = [4_'abc', 4_'EFG', 4_'klm', 4_'NOP']! str_k4_arr
+ co_str_k4_arr(:)[this_image()] = [4_'abc', 4_'EFG', 4_'klm', 4_'NOP']! str_k4_arr
if (any(co_str_k4_arr /= [4_'abc ', 4_'EFG ', 4_'klm ', 4_'NOP '])) STOP 6
- co_str_k4_arr(:)[1] = str_k1_arr
+ co_str_k4_arr(:)[this_image()] = str_k1_arr
if (any(co_str_k4_arr /= [ 4_'abc ', 4_'EFG ', 4_'klm ', 4_'NOP '])) STOP 7
- co_str_k1_arr(:)[1] = str_k4_arr
+ co_str_k1_arr(:)[this_image()] = str_k4_arr
if (any(co_str_k1_arr /= ['abc ', 'EFG ', 'klm ', 'NOP '])) STOP 8
end program send_convert_char_array
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-20 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20 15:24 [patch, fortran, testsuite, committed] Fix some more coarray stuff Thomas König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).