https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112862

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to r...@cebitec.uni-bielefeld.de from comment #10)
> > --- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
> > (In reply to Rainer Orth from comment #8)
> >> Again tested on macOS 11 (unchanged) and 14.  On the latter, the previous
> >> failures
> >> to find libatomic.1.dylib have been traded for
> >> 
> >> FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=single  -O2  (test for
> >> excess errors)
> >> Excess errors: 
> >> ld: warning: duplicate -rpath
> >> '/private/var/gcc/regression/master/14-gcc/build/x86_64-apple-darwin23.2.0/
> >> libatomic/.libs' ignored
> >> 
> >> This is definitely progress ;-)
> >
> > hmm I wonder where this is coming from .. as you noted there is a bit of a
> > tendency in the testsuite to add stuff somewhat randomly.
> 
> Right: I believe sometimes such duplication depends on whether you run
> the test sequentially or in parallel.
> 
> FWIW, alloc_comp_1.f90 is linked like
> 
> spawn -ignore SIGHUP
> /private/var/gcc/regression/master/14-gcc/build/gcc/testsuite/gfortran/../../
> gfortran
> -B/private/var/gcc/regression/master/14-gcc/build/gcc/testsuite/gfortran/../.
> ./
> -B/private/var/gcc/regression/master/14-gcc/build/x86_64-apple-darwin23.2.0/.
> /libgfortran/
> /vol/gcc/src/hg/master/darwin/gcc/testsuite/gfortran.dg/coarray/alloc_comp_1.
> f90 -fdiagnostics-plain-output -fdiagnostics-plain-output -fcoarray=single
> -O2
> -B/private/var/gcc/regression/master/14-gcc/build/x86_64-apple-darwin23.2.0/.
> /libatomic/
> -B/private/var/gcc/regression/master/14-gcc/build/x86_64-apple-darwin23.2.0/.
> /libatomic/.libs
> -B/private/var/gcc/regression/master/14-gcc/build/x86_64-apple-darwin23.2.0/.
> /libgfortran/.libs
> -B/private/var/gcc/regression/master/14-gcc/build/x86_64-apple-darwin23.2.0/.
> /libatomic/.libs
> -B/private/var/gcc/regression/master/14-gcc/build/x86_64-apple-darwin23.2.0/.
> /libquadmath/.libs -lm -o ./alloc_comp_1.exe
> 
> In this case (by pure inspection) caf.exp includes both gfortran-dg.exp
> and atomic-dg.exp.  The latter adds -B... itself.

Yes, indeed (FWIW: that target-supports check will only actually work
[uninstalled] if the path to lib atomic is available, so it already depends on
that being added in gfortran_init).

I'm removing the extra references to libatomic in gfortran.dg/dg.exp and
caf.exp and then will test serial and parallel cases.  We can assert that the
presence of the libraries as detected in gfortran_init is sufficient to state
"target supports".

Reply via email to