The attached change fixes the fortran coarray tests on hpux. On hpux,
it is necessary
to link directly against libatomic.
Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
Okay for trunk?
Dave
--
John David Anglin dave.ang...@bell.net
2014-12-07 John David Anglin <dang...@gcc.gnu.org>
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.
Index: lib/gfortran.exp
===================================================================
--- lib/gfortran.exp (revision 218435)
+++ lib/gfortran.exp (working copy)
@@ -102,6 +102,13 @@
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.
Index: gfortran.dg/coarray/caf.exp
===================================================================
--- gfortran.dg/coarray/caf.exp (revision 218435)
+++ gfortran.dg/coarray/caf.exp (working copy)
@@ -65,13 +65,13 @@
foreach flags $option_list {
verbose "Testing $nshort (single), $flags" 1
- 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
- dg-test $test "-fcoarray=lib $flags -lcaf_single" ""
+ dg-test $test "-fcoarray=lib $flags -lcaf_single -latomic" ""
cleanup-modules ""
}
}
Index: gfortran.dg/coarray_lib_comm_1.f90
===================================================================
--- gfortran.dg/coarray_lib_comm_1.f90 (revision 218435)
+++ gfortran.dg/coarray_lib_comm_1.f90 (working copy)
@@ -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
!