https://gcc.gnu.org/g:132139c00a8ed6d6941a7d51fecca886d13d527a

commit r16-7743-g132139c00a8ed6d6941a7d51fecca886d13d527a
Author: Steve Kargl <[email protected]>
Date:   Mon Feb 23 10:18:00 2026 -0800

    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.

Diff:
---
 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 02c3591f377d..3db249a920f8 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 ""
         }
     }

Reply via email to