[PATCH 22/22] Coarray caf_shmem final patch set

Jerry D <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Ref: https://gcc.gnu.org/pipermail/fortran/2026-February/063551.html

See attached.

Awaiting approval.

This is the last one.

Best regards to all,

Jerry
caf_shmem-22-of-22.patch (text/x-patch, 1.3 KB)
From 5da4bdb1d92bffba91d4f7cbb9ea7f7bc274190b Mon Sep 17 00:00:00 2001
From: Steve Kargl <[email protected]>
Date: Mon, 23 Feb 2026 10:18:00 -0800
Subject: [PATCH] Fortran: Use -pthread on target *-*-freebsd*

	PR fortran/88076

gcc/testsuite/ChangeLog:

	* gfortran.dg/coarray/caf.exp: If the target is a FreeBSD
	system add -pthread when running tests.
---
 gcc/testsuite/gfortran.dg/coarray/caf.exp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp
index 02c3591f377..3db249a920f 100644
--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
+++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
@@ -120,7 +120,11 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]]
         foreach flags $option_list {
             verbose "Testing $nshort (libcaf_shmem), $flags" 1
             set gfortran_aux_module_flags "-fcoarray=lib $flags -lcaf_shmem"
-            dg-test $test "-fcoarray=lib $flags -lcaf_shmem" {}
+            if { [istarget *-*-freebsd*] } {
+                dg-test $test "-fcoarray=lib -pthread $flags -lcaf_shmem" {}
+            } else {
+                dg-test $test "-fcoarray=lib $flags -lcaf_shmem" {}
+            }
             cleanup-modules ""
         }
     }
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.