https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121360

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Created attachment 63592
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63592&action=edit
Fix for this bug

This attached patch provided by Andre. It turns out to not involve the lock
mechanisms at all.  After applying this and using 12 images.

$ $FC locks.f90 -O2 -fcoarray=lib -lcaf_shmem
$ time ./a.out 
 Expected:           12 Found:           12
 Expected:          120 Found:          120
 Expected:         1200 Found:         1200
 Expected:        12000 Found:        12000
 Expected:       120000 Found:       120000

real    0m0.024s
user    0m0.054s
sys     0m0.146s

Reply via email to