Commit b85449ad by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

re PR testsuite/62250 (FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib -O2 -lcaf_single)

	PR testsuite/62250
	* lib/target-supports.exp (check_effective_target_libatomic_available):
	New.
	* gfortran.dg/coarray/caf.exp: Only add -latomic for
	targets that match effective-target libatomic_available.
	* gfortran.dg/coarray_lib_comm_1.f90: Similar.

From-SVN: r219364
parent 303e1d56
2015-01-08 Hans-Peter Nilsson <hp@axis.com>
PR testsuite/62250
* lib/target-supports.exp (check_effective_target_libatomic_available):
New.
* gfortran.dg/coarray/caf.exp: Only add -latomic for
targets that match effective-target libatomic_available.
* gfortran.dg/coarray_lib_comm_1.f90: Similar.
2015-01-08 David Malcolm <dmalcolm@redhat.com>
* jit.dg/test-error-block-in-wrong-function.c (verify_code):
......
......@@ -58,6 +58,12 @@ proc dg-compile-aux-modules { args } {
# cleanup-modules isn't intentionally invoked here.
}
# Add -latomic only where supported. Assume built-in support elsewhere.
set maybe_atomic_lib ""
if [check_effective_target_libatomic_available] {
set maybe_atomic_lib "-latomic"
}
# Main loop.
foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] {
# If we're only testing specific files and this isn't one of them, skip it.
......@@ -81,14 +87,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 -latomic" ""
dg-test $test "-fcoarray=single $flags $maybe_atomic_lib" ""
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 -latomic" ""
dg-test $test "-fcoarray=lib $flags -lcaf_single $maybe_atomic_lib" ""
cleanup-modules ""
}
}
......
......@@ -1128,6 +1128,13 @@ proc check_libcilkrts_available { } {
} "-fcilkplus -lcilkrts" ]
}
# Return true if the atomic library is supported on the target.
proc check_effective_target_libatomic_available { } {
return [check_no_compiler_messages libatomic_available executable {
int main (void) { return 0; }
} "-latomic"]
}
# Return 1 if an ASCII locale is supported on this host, 0 otherwise.
proc check_ascii_locale_available { } {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment