[PATCH] PR 125324 Fix - -fcoarray=shared should imply -pthread / gfortran.dg/coarray_51.f90 FAIL
Jerry D
jvdelisle2@gmail.com
Tue Jun 2 16:53:38 GMT 2026
The master branch has been updated by Jerry DeLisle <jvdelisle@gcc.gnu.org>:
https://gcc.gnu.org/g:ee7d0c7b4102b8ef0bcaa725c75e141248b774cb
commit r17-1234-gee7d0c7b4102b8ef0bcaa725c75e141248b774cb
Author: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Date: Wed May 27 09:24:26 2026 -0700
On 6/1/26 11:04 PM, Paul Richard Thomas wrote:
> Hi Jerry,
>
> I was hoping that somebody else would step up because I had some
> (slight) involvement :-)
>
> LGTM OK for mainline.
>
> Regards
>
> Paul
>
> On Tue, 2 Jun 2026 at 03:52, Jerry D <jvdelisle2@gmail.com> wrote:
>>
>> [PING]
>>
>> On 5/27/26 9:35 AM, Jerry D wrote:
>>> As stated in the PR, this issue is possibly related to the version of glibc
>>> installed on some systems. I can't test this on so many systems, so I want to
>>> see if the auto testers pick it up. The patch is fairly simple. I copied Tobias
>>> as the original reporter.
>>>
>>> Assisted by Claude Sonnet 4.6 to be clear. See attached.
>>>
>>> OK for mainline? If accepted probably should be backported to 16.
>>>
>>> Jerry
>>>
>>> ---
>>> fortran: also link -lpthread when -fcoarray=shared is used
>>>
>>> [PR125324]
>>>
>>> When the driver auto-links -lcaf_shmem for -fcoarray=shared it must also
>>> link -lpthread because the shmem CAF runtime uses POSIX threads internally.
>>>
>>> PR fortran/125324
>>>
>>> gcc/fortran/ChangeLog:
>>>
>>> * gfortranspec.cc (lang_specific_driver): Also append -lpthread
>>> when need_caf_shmem is set.
>>>
>>> Assisted by: Claude Sonnet 4.6
>>> ---
>>
More information about the Fortran
mailing list