]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Adjust test to work with multiple images.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 14 Feb 2026 23:46:44 +0000 (15:46 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Feb 2026 17:18:25 +0000 (09:18 -0800)
commitbe90cfa22cb4e3cea7ffb4ca429829381369a8d2
tree086fd960faffeda6e19b67cf2e2fb738627d7811
parentfc65b1e735b5fd393003361dc219ebecf454b169
Fortran: Adjust test to work with multiple images.

The testcase would fail occasionally with multiple images because the
use of acquired_lock is a non-blocking LOCK. Only UNLOCK this if the
LOCK was acquired. Keep track of the loop count and bail out if the
limit is reached.

During testing it was observed that the loop count could go as high as
33 times depending on system conditions, running the test outside the
testsuite 1000's of times.

PR fortran/121429

gcc/testsuite/ChangeLog:

* gfortran.dg/coarray/lock_1.f90: Updated.
gcc/testsuite/gfortran.dg/coarray/lock_1.f90