diff mbox

[committed] Link various gfortran tests against libatomic when available

Message ID E8A89B27-47DA-4E5E-B887-BE3D92230DEA@bell.net
State New
Headers show

Commit Message

John David Anglin Jan. 28, 2017, 5:09 p.m. UTC
The attached change fixes these fortran tests on hppa-hpux.  We need to explicitly link against libatomic.
Committed to trunk.

Dave
--
John David Anglin	dave.anglin@bell.net
2017-01-28  John David Anglin  <danglin@gcc.gnu.org>

	* gfortran.dg/coarray_41.f90: Add "-latomic" option if
	libatomic_available.
	* gfortran.dg/coarray_42.f90: Likewise.
	* gfortran.dg/coarray_alloc_comp_3.f08: Likewise.
	* gfortran.dg/coarray_alloc_comp_4.f08: Likewise.
	* gfortran.dg/coarray_lib_alloc_4.f90: Likewise.
diff mbox

Patch

Index: gfortran.dg/coarray_41.f90
===================================================================
--- gfortran.dg/coarray_41.f90	(revision 244960)
+++ gfortran.dg/coarray_41.f90	(working copy)
@@ -1,5 +1,6 @@ 
 ! { dg-do run }
 ! { dg-options "-fcoarray=lib -lcaf_single" }
+! { dg-additional-options "-latomic" { target libatomic_available } }
 
 program coarray_41
 
Index: gfortran.dg/coarray_42.f90
===================================================================
--- gfortran.dg/coarray_42.f90	(revision 244960)
+++ gfortran.dg/coarray_42.f90	(working copy)
@@ -1,5 +1,6 @@ 
 ! { dg-do run }
 ! { dg-options "-fdump-tree-original -fcoarray=lib -lcaf_single" }
+! { dg-additional-options "-latomic" { target libatomic_available } }
 
 program Jac
   type Domain
Index: gfortran.dg/coarray_alloc_comp_3.f08
===================================================================
--- gfortran.dg/coarray_alloc_comp_3.f08	(revision 244960)
+++ gfortran.dg/coarray_alloc_comp_3.f08	(working copy)
@@ -1,5 +1,6 @@ 
 ! { dg-do run }
 ! { dg-options "-fcoarray=lib -lcaf_single" }
+! { dg-additional-options "-latomic" { target libatomic_available } }
 !
 ! Contributed by Andre Vehreschild
 ! Check that manually freeing components does not lead to a runtime crash,
Index: gfortran.dg/coarray_alloc_comp_4.f08
===================================================================
--- gfortran.dg/coarray_alloc_comp_4.f08	(revision 244960)
+++ gfortran.dg/coarray_alloc_comp_4.f08	(working copy)
@@ -1,5 +1,6 @@ 
 ! { dg-do compile }
 ! { dg-options "-fcoarray=lib -fdump-tree-original" }
+! { dg-additional-options "-latomic" { target libatomic_available } }
 !
 ! Contributed by Andre Vehreschild
 ! Check that sub-components are caf_deregistered and not freed.
Index: gfortran.dg/coarray_lib_alloc_4.f90
===================================================================
--- gfortran.dg/coarray_lib_alloc_4.f90	(revision 244960)
+++ gfortran.dg/coarray_lib_alloc_4.f90	(working copy)
@@ -1,5 +1,6 @@ 
 ! { dg-do run }
 ! { dg-options "-fcoarray=lib -lcaf_single -fdump-tree-original" }
+! { dg-additional-options "-latomic" { target libatomic_available } }
 !
 ! Allocate/deallocate with libcaf.
 !