Commit a782ee45 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

re PR testsuite/25891 (gomp tests run on non-libgomp (non-thread) ports, failing all)

	PR testsuite/25891
	* lib/target-supports.exp (check_effective_target_fopenmp): New proc.
	* gcc.dg/gomp/gomp.exp: Return without testing anything if
	check_effective_target_fopenmp returns 0.

From-SVN: r110148
parent 83900997
2006-01-24 Hans-Peter Nilsson <hp@axis.com>
PR testsuite/25891
* lib/target-supports.exp (check_effective_target_fopenmp): New proc.
* gcc.dg/gomp/gomp.exp: Return without testing anything if
check_effective_target_fopenmp returns 0.
2006-01-23 Eric Botcazou <ebotcazou@adacore.com> 2006-01-23 Eric Botcazou <ebotcazou@adacore.com>
PR ada/20548 PR ada/20548
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# Load support procs. # Load support procs.
load_lib gcc-dg.exp load_lib gcc-dg.exp
if ![check_effective_target_fopenmp] {
return
}
# Initialize `dg'. # Initialize `dg'.
dg-init dg-init
......
...@@ -468,6 +468,41 @@ proc check_effective_target_tls_runtime {} { ...@@ -468,6 +468,41 @@ proc check_effective_target_tls_runtime {} {
return $et_tls_runtime_saved return $et_tls_runtime_saved
} }
# Return 1 if compilation with -fopenmp is error-free for trivial
# code, 0 otherwise.
proc check_effective_target_fopenmp {} {
global et_fopenmp_saved
global et_fopenmp_target_name
if { ![info exists et_fopenmp_target_name] } {
set et_fopenmp_target_name ""
}
# If the target has changed since we set the cached value, clear it.
set current_target [current_target_name]
if { $current_target != $et_fopenmp_target_name } {
verbose "check_effective_target_fopenmp: `$et_fopenmp_target_name'" 2
set et_fopenmp_target_name $current_target
if [info exists et_fopenmp_saved] {
verbose "check_effective_target_fopenmp: removing cached result" 2
unset et_fopenmp_saved
}
}
if [info exists et_fopenmp_saved] {
verbose "check_effective_target_fopenmp: using cached result" 2
} else {
verbose "check_effective_target_fopenmp: compiling source" 2
set et_fopenmp_saved [string match "" [get_compiler_messages fopenmp object {
void foo (void) { }
} "-fopenmp"]]
}
verbose "check_effective_target_fopenmp: returning $et_fopenmp_saved" 2
return $et_fopenmp_saved
}
# Return 1 if -fpic and -fPIC are supported, as in no warnings or errors # Return 1 if -fpic and -fPIC are supported, as in no warnings or errors
# emitted, 0 otherwise. Whether a shared library can actually be built is # emitted, 0 otherwise. Whether a shared library can actually be built is
# out of scope for this test. # out of scope for this test.
......
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