From 3fd99bca7a81dfd46d4b86ad429cd730484f1689 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sun, 4 Jan 2015 01:22:54 +0000 Subject: [PATCH] re PR testsuite/62250 (FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib -O2 -lcaf_single) PR testsuite/62250 * lib/gfortran.exp: Add libatomic library search path. * gfortran.dg/coarray/caf.exp: Add -latomic to test options. * gfortran.dg/coarray_lib_comm_1.f90: Likewise. From-SVN: r219171 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/coarray/caf.exp | 4 ++-- gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 | 2 +- gcc/testsuite/lib/gfortran.exp | 7 +++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 306ebd16c09..774a429e67a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-01-03 John David Anglin + PR testsuite/62250 + * lib/gfortran.exp: Add libatomic library search path. + * gfortran.dg/coarray/caf.exp: Add -latomic to test options. + * gfortran.dg/coarray_lib_comm_1.f90: Likewise. + * gcc.dg/pr63914.c: Add -fno-common option on hppa*-*-hpux*. 2015-01-02 Bernd Edlinger diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp index e4e37983fda..79a04ea9b78 100644 --- a/gcc/testsuite/gfortran.dg/coarray/caf.exp +++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp @@ -81,14 +81,14 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] foreach flags $option_list { verbose "Testing $nshort (single), $flags" 1 set gfortran_aux_module_flags "-fcoarray=single $flags" - dg-test $test "-fcoarray=single $flags" "" + dg-test $test "-fcoarray=single $flags -latomic" "" cleanup-modules "" } foreach flags $option_list { verbose "Testing $nshort (libcaf_single), $flags" 1 set gfortran_aux_module_flags "-fcoarray=lib $flags -lcaf_single" - dg-test $test "-fcoarray=lib $flags -lcaf_single" "" + dg-test $test "-fcoarray=lib $flags -lcaf_single -latomic" "" cleanup-modules "" } } diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 index 1db40feb7f9..10346d459b6 100644 --- a/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! { dg-options "-fdump-tree-original -fcoarray=lib -lcaf_single" } +! { dg-options "-fdump-tree-original -fcoarray=lib -lcaf_single -latomic" } ! ! Some dependency-analysis check for coarray communication ! diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp index 9d174bbabb7..e0017a639b2 100644 --- a/gcc/testsuite/lib/gfortran.exp +++ b/gcc/testsuite/lib/gfortran.exp @@ -102,6 +102,13 @@ proc gfortran_link_flags { paths } { if [file exists "${gccpath}/libgfortran/libgforbegin.a"] { append flags "-L${gccpath}/libgfortran " } + if [file exists "${gccpath}/libatomic/.libs/libatomic.${shlib_ext}"] { + append flags "-L${gccpath}/libatomic/.libs " + append ld_library_path ":${gccpath}/libatomic/.libs" + } + if [file exists "${gccpath}/libatomic/libatomic.a"] { + append flags "-L${gccpath}/libatomic " + } if [file exists "${gccpath}/libquadmath/.libs/libquadmath.a"] { # Some targets use libquadmath.a%s in their specs, so they need a -B option # for uninstalled testing. -- 2.30.2