PR testsuite/62250
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jan 2015 01:22:54 +0000 (01:22 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jan 2015 01:22:54 +0000 (01:22 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219171 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/coarray/caf.exp
gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90
gcc/testsuite/lib/gfortran.exp

index 306ebd1..774a429 100644 (file)
@@ -1,5 +1,10 @@
 2015-01-03  John David Anglin  <danglin@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.
+
        * gcc.dg/pr63914.c: Add -fno-common option on hppa*-*-hpux*.
 
 2015-01-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
index e4e3798..79a04ea 100644 (file)
@@ -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 ""
     }
 }
index 1db40fe..10346d4 100644 (file)
@@ -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
 !
index 9d174bb..e0017a6 100644 (file)
@@ -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.