[PATCH] PR 125324 Fix - -fcoarray=shared should imply -pthread / gfortran.dg/coarray_51.f90 FAIL
Jerry D
jvdelisle2@gmail.com
Tue Jun 2 02:52:29 GMT 2026
[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