On Tue, Jan 06, 2026 at 10:23:18PM +0100, Thomas Koenig wrote:
> Am 06.01.26 um 22:10 schrieb Steve Kargl:
> > There's a regressio on FreeBSD. The new testcase
> > needs
> >
> > diff --git a/gcc/testsuite/gfortran.dg/pr119136.f90
> > b/gcc/testsuite/gfortran.dg/pr119136.f90
> > index e579083b9b6..206d4e3f90f 100644
> > --- a/gcc/testsuite/gfortran.dg/pr119136.f90
> > +++ b/gcc/testsuite/gfortran.dg/pr119136.f90
> > @@ -1,4 +1,5 @@
> > ! { dg-do run }
> > +! { dg-options "-pthread" { target { x86_64-*-freebsd* } } }
> > ! { dg-shouldfail "Recursive" }
> > print *, foo_io()
>
> Hi Steve,
>
> that option should not be needed. I thought I had fixed this, but
> without access to a machine, that is difficult to debug.
>
> I'll ask for a suitable system on the compile farm.
>
When I tested your p2.diff, I may have had Jerry's pr119136.f90
with the dg-option line. I did a 'git reset --hard' to clean out
my local sources of all changes, pulled your commit, and saw
the failure.
Unfortunately, I can't give anyone access to my FreeBSD system.
But, I can run gdb for you if you have a something specific
to investigate.
I don't know the history of threading on FreeBSD. libc.so
contains a bunch of weak references
nm --dynamic /lib/libc.so.7 | grep pthread
...
000000000009dc40 W pthread_rwlock_destroy@@FBSD_1.0
000000000009dc60 W pthread_rwlock_init@@FBSD_1.0
000000000009dc80 W pthread_rwlock_rdlock@@FBSD_1.0
000000000009dca0 W pthread_rwlock_tryrdlock@@FBSD_1.0
000000000009dcc0 W pthread_rwlock_trywrlock@@FBSD_1.0
000000000009dce0 W pthread_rwlock_unlock@@FBSD_1.0
000000000009dd00 W pthread_rwlock_wrlock@@FBSD_1.0
...
which are used if a suitable regular pthread function is
not available. Perhaps, this is interfering with what
you're trying to accomplish.
--
Steve