Instead, 'return' early from the '*.exp' files that we're not able to test.
Also, change 'puts' into 'verbose -log'. While re-indenting the previous
'if { $lang_test_file_found } { [...] }' code, also simplify 'ld_library_path'
setup.
libgomp/
* testsuite/lib/libgomp.exp (libgomp_target_compile): Don't look
at 'lang_test_file_found'.
* testsuite/libgomp.c++/c++.exp: Don't set and use it, and instead
'return' early if not able to test. Simplify 'ld_library_path' setup.
* testsuite/libgomp.fortran/fortran.exp: Likewise.
* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
global gluefile wrap_flags
global ALWAYS_CFLAGS
global GCC_UNDER_TEST
- global lang_test_file_found
+
+ global lang_source_re lang_include_flags
+ if { [info exists lang_include_flags] \
+ && [regexp ${lang_source_re} ${source}] } {
+ lappend options "additional_flags=${lang_include_flags}"
+ }
+
global lang_library_path
+ if { [info exists lang_library_path] } {
+ # Some targets use libgfortran.a%s in their specs, so they need
+ # a -B option for uninstalled testing.
+ lappend options "additional_flags=-B${blddir}/${lang_library_path}"
+ lappend options "ldflags=-L${blddir}/${lang_library_path}"
+ }
global lang_link_flags
- global lang_include_flags
- global lang_source_re
-
- if { [info exists lang_test_file_found] } {
- if { $blddir != "" } {
- # Some targets use libgfortran.a%s in their specs, so they need
- # a -B option for uninstalled testing.
- lappend options "additional_flags=-B${blddir}/${lang_library_path}"
- lappend options "ldflags=-L${blddir}/${lang_library_path}"
- }
- lappend options "ldflags=${lang_link_flags}"
- if { [info exists lang_include_flags] \
- && [regexp ${lang_source_re} ${source}] } {
- lappend options "additional_flags=${lang_include_flags}"
- }
+ if { [info exists lang_link_flags] } {
+ lappend options "ldflags=${lang_link_flags}"
}
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
load_lib libgomp-dg.exp
load_gcc_lib gcc-dg.exp
-set lang_test_file_found 0
if { $blddir != "" } {
set lang_library_path "../libstdc++-v3/src/.libs"
set shlib_ext [get_shlib_extension]
- # Look for a static libstdc++ first.
- if [file exists "${blddir}/${lang_library_path}/libstdc++.a"] {
- set lang_test_file_found 1
- # We may have a shared only build, so look for a shared libstdc++.
- } elseif [file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] {
- set lang_test_file_found 1
- } else {
- puts "No libstdc++ library found, will not execute c++ tests"
+ if { ![file exists "${blddir}/${lang_library_path}/libstdc++.a"]
+ && ![file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] } {
+ verbose -log "No libstdc++ library found, will not execute c++ tests"
+ unset lang_library_path
+ return
}
-} elseif { [info exists GXX_UNDER_TEST] } {
- set lang_test_file_found 1
-} else {
- puts "GXX_UNDER_TEST not defined, will not execute c++ tests"
+} elseif { ![info exists GXX_UNDER_TEST] } {
+ verbose -log "GXX_UNDER_TEST not defined, will not execute c++ tests"
+ return
}
set lang_link_flags "-lstdc++"
set SAVE_GCC_UNDER_TEST "$GCC_UNDER_TEST"
set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
-if { $lang_test_file_found } {
- # Gather a list of all tests.
- set tests [lsort [concat \
- [find $srcdir/$subdir *.C] \
- [find $srcdir/$subdir/../libgomp.c-c++-common *.c]]]
+# Gather a list of all tests.
+set tests [lsort [concat \
+ [find $srcdir/$subdir *.C] \
+ [find $srcdir/$subdir/../libgomp.c-c++-common *.c]]]
- if { $blddir != "" } {
- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
- } else {
- set ld_library_path "$always_ld_library_path"
- }
- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
- set_ld_library_path_env_vars
-
- set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
- if { $blddir != ""
- && [file exists $flags_file] } {
- set lang_source_re {^.*\.[cC]$}
- set lang_include_flags [exec sh $flags_file --build-includes]
- }
+set ld_library_path $always_ld_library_path
+if { $blddir != "" } {
+ append ld_library_path ":${blddir}/${lang_library_path}"
+}
+append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+set_ld_library_path_env_vars
- # Main loop.
- dg-runtest $tests "" $DEFAULT_CFLAGS
+set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
+if { $blddir != ""
+ && [file exists $flags_file] } {
+ set lang_source_re {^.*\.[cC]$}
+ set lang_include_flags [exec sh $flags_file --build-includes]
}
+# Main loop.
+dg-runtest $tests "" $DEFAULT_CFLAGS
+
# See above.
set GCC_UNDER_TEST "$SAVE_GCC_UNDER_TEST"
unset lang_library_path
}
unset lang_link_flags
-unset lang_test_file_found
# All done.
dg-finish
load_gcc_lib gcc-dg.exp
load_gcc_lib gfortran-dg.exp
-set lang_test_file_found 0
if { $blddir != "" } {
set lang_library_path "../libgfortran/.libs"
set shlib_ext [get_shlib_extension]
- # Look for a static libgfortran first.
- if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
- set lang_test_file_found 1
- # We may have a shared only build, so look for a shared libgfortran.
- } elseif [file exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] {
- set lang_test_file_found 1
- } else {
- puts "No libgfortran library found, will not execute fortran tests"
+ if { ![file exists "${blddir}/${lang_library_path}/libgfortran.a"]
+ && ![file exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] } {
+ verbose -log "No libgfortran library found, will not execute fortran tests"
+ unset lang_library_path
+ return
}
-} elseif [info exists GFORTRAN_UNDER_TEST] {
- set lang_test_file_found 1
-} else {
- puts "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
+} elseif { ![info exists GFORTRAN_UNDER_TEST] } {
+ verbose -log "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
+ return
}
if { $blddir != "" } {
set lang_source_re {^.*\.[fF](|90|95|03|08)$}
# Turn on OpenMP.
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
-if { $lang_test_file_found } {
- # Gather a list of all tests.
- set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
+# Gather a list of all tests.
+set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
- if { $blddir != "" } {
- set quadmath_library_path "../libquadmath/.libs"
- if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
- || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
- lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
- # Allow for spec subsitution.
- lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/"
- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}"
- append lang_link_flags " -lquadmath"
- } else {
- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
- }
- unset quadmath_library_path
- } else {
- set ld_library_path "$always_ld_library_path"
- if { [check_no_compiler_messages has_libquadmath executable {
- int main() {return 0;}
- } "-lgfortran -lquadmath"] } then {
- append lang_link_flags " -lquadmath"
- }
- }
- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
- set_ld_library_path_env_vars
+set ld_library_path $always_ld_library_path
+if { $blddir != "" } {
+ append ld_library_path ":${blddir}/${lang_library_path}"
- # For Fortran we're doing torture testing, as Fortran has far more tests
- # with arrays etc. that testing just -O0 or -O2 is insufficient, that is
- # typically not the case for C/C++.
- gfortran-dg-runtest $tests "" ""
+ set quadmath_library_path "../libquadmath/.libs"
+ if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
+ || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
+ lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
+ # Allow for spec subsitution.
+ lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/"
+ append ld_library_path ":${blddir}/${quadmath_library_path}"
+ append lang_link_flags " -lquadmath"
+ }
+ unset quadmath_library_path
+} else {
+ if { [check_no_compiler_messages has_libquadmath executable {
+ int main() {return 0;}
+ } "-lgfortran -lquadmath"] } then {
+ append lang_link_flags " -lquadmath"
+ }
}
+append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+set_ld_library_path_env_vars
+
+# For Fortran we're doing torture testing, as Fortran has far more tests
+# with arrays etc. that testing just -O0 or -O2 is insufficient, that is
+# typically not the case for C/C++.
+gfortran-dg-runtest $tests "" ""
if { $blddir != "" } {
unset lang_source_re
unset lang_library_path
}
unset lang_link_flags
-unset lang_test_file_found
# All done.
dg-finish
return 1
}
-set lang_test_file_found 0
if { $blddir != "" } {
set lang_library_path "../libstdc++-v3/src/.libs"
set shlib_ext [get_shlib_extension]
- # Look for a static libstdc++ first.
- if [file exists "${blddir}/${lang_library_path}/libstdc++.a"] {
- set lang_test_file_found 1
- # We may have a shared only build, so look for a shared libstdc++.
- } elseif [file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] {
- set lang_test_file_found 1
- } else {
- puts "No libstdc++ library found, will not execute c++ tests"
+ if { ![file exists "${blddir}/${lang_library_path}/libstdc++.a"]
+ && ![file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] } {
+ verbose -log "No libstdc++ library found, will not execute c++ tests"
+ unset lang_library_path
+ return
}
-} elseif { [info exists GXX_UNDER_TEST] } {
- set lang_test_file_found 1
-} else {
- puts "GXX_UNDER_TEST not defined, will not execute c++ tests"
+} elseif { ![info exists GXX_UNDER_TEST] } {
+ verbose -log "GXX_UNDER_TEST not defined, will not execute c++ tests"
+ return
}
set lang_link_flags "-lstdc++"
set SAVE_GCC_UNDER_TEST "$GCC_UNDER_TEST"
set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
-if { $lang_test_file_found } {
- # Gather a list of all tests.
- set tests [lsort [concat \
- [find $srcdir/$subdir *.C] \
- [find $srcdir/$subdir/../libgomp.oacc-c-c++-common *.c]]]
+# Gather a list of all tests.
+set tests [lsort [concat \
+ [find $srcdir/$subdir *.C] \
+ [find $srcdir/$subdir/../libgomp.oacc-c-c++-common *.c]]]
- if { $blddir != "" } {
- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
- } else {
- set ld_library_path "$always_ld_library_path"
- }
- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
- set_ld_library_path_env_vars
-
- set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
- if { $blddir != ""
- && [file exists $flags_file] } {
- set lang_source_re {^.*\.[cC]$}
- set lang_include_flags [exec sh $flags_file --build-includes]
- }
+set ld_library_path $always_ld_library_path
+if { $blddir != "" } {
+ append ld_library_path ":${blddir}/${lang_library_path}"
+}
+append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+set_ld_library_path_env_vars
+
+set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
+if { $blddir != ""
+ && [file exists $flags_file] } {
+ set lang_source_re {^.*\.[cC]$}
+ set lang_include_flags [exec sh $flags_file --build-includes]
+}
- # Test with all available offload targets, and with offloading disabled.
- foreach offload_target [concat [split $offload_targets ","] "disable"] {
- global openacc_device_type
- set openacc_device_type [offload_target_to_openacc_device_type $offload_target]
- set tagopt "-DACC_DEVICE_TYPE_$openacc_device_type=1"
+# Test with all available offload targets, and with offloading disabled.
+foreach offload_target [concat [split $offload_targets ","] "disable"] {
+ global openacc_device_type
+ set openacc_device_type [offload_target_to_openacc_device_type $offload_target]
+ set tagopt "-DACC_DEVICE_TYPE_$openacc_device_type=1"
- switch $openacc_device_type {
- "" {
- unsupported "$subdir $offload_target offloading"
+ switch $openacc_device_type {
+ "" {
+ unsupported "$subdir $offload_target offloading"
+ continue
+ }
+ host {
+ set acc_mem_shared 1
+ }
+ nvidia {
+ if { ![check_effective_target_openacc_nvidia_accel_present] } {
+ # Don't bother; execution testing is going to FAIL.
+ untested "$subdir $offload_target offloading: supported, but hardware not accessible"
continue
}
- host {
- set acc_mem_shared 1
- }
- nvidia {
- if { ![check_effective_target_openacc_nvidia_accel_present] } {
- # Don't bother; execution testing is going to FAIL.
- untested "$subdir $offload_target offloading: supported, but hardware not accessible"
- continue
- }
- # Copy ptx file (TEMPORARY)
- remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx
+ # Copy ptx file (TEMPORARY)
+ remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx
- # Where timer.h lives
- lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/libgomp.oacc-c-c++-common"
+ # Where timer.h lives
+ lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/libgomp.oacc-c-c++-common"
- set acc_mem_shared 0
- }
- radeon {
- if { ![check_effective_target_openacc_radeon_accel_present] } {
- # Don't bother; execution testing is going to FAIL.
- untested "$subdir $offload_target offloading: supported, but hardware not accessible"
- continue
- }
-
- set acc_mem_shared 0
- }
- default {
- error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
- }
+ set acc_mem_shared 0
}
- set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
-
- # To avoid compilation overhead, and to keep simple '-foffload=[...]'
- # handling in test cases, by default only build for the offload target
- # that we're actually going to test.
- set tagopt "$tagopt -foffload=$offload_target"
- # Force usage of the corresponding OpenACC device type.
- setenv ACC_DEVICE_TYPE $openacc_device_type
-
- # To get better test coverage for device-specific code that is only
- # ever used in offloading configurations, we'd like more thorough
- # testing for test cases that deal with offloading, which most of all
- # OpenACC test cases are. We enable torture testing, but limit it to
- # -O0 and -O2 only, to avoid testing times exploding too much, under
- # the assumption that between -O0 and -O[something] there is the
- # biggest difference in the overall structure of the generated code.
- switch -glob $offload_target {
- disable {
- set-torture-options [list \
- { -O2 } ]
- }
- default {
- set-torture-options [list \
- { -O0 } \
- { -O2 } ]
+ radeon {
+ if { ![check_effective_target_openacc_radeon_accel_present] } {
+ # Don't bother; execution testing is going to FAIL.
+ untested "$subdir $offload_target offloading: supported, but hardware not accessible"
+ continue
}
- }
- gcc-dg-runtest $tests "$tagopt" ""
+ set acc_mem_shared 0
+ }
+ default {
+ error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
+ }
}
- unset offload_target
-} else {
- # Call this once, which placates the subsequent torture-finish.
- set-torture-options [list \
- { INVALID } ]
+ set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
+
+ # To avoid compilation overhead, and to keep simple '-foffload=[...]'
+ # handling in test cases, by default only build for the offload target
+ # that we're actually going to test.
+ set tagopt "$tagopt -foffload=$offload_target"
+ # Force usage of the corresponding OpenACC device type.
+ setenv ACC_DEVICE_TYPE $openacc_device_type
+
+ # To get better test coverage for device-specific code that is only
+ # ever used in offloading configurations, we'd like more thorough
+ # testing for test cases that deal with offloading, which most of all
+ # OpenACC test cases are. We enable torture testing, but limit it to
+ # -O0 and -O2 only, to avoid testing times exploding too much, under
+ # the assumption that between -O0 and -O[something] there is the
+ # biggest difference in the overall structure of the generated code.
+ switch -glob $offload_target {
+ disable {
+ set-torture-options [list \
+ { -O2 } ]
+ }
+ default {
+ set-torture-options [list \
+ { -O0 } \
+ { -O2 } ]
+ }
+ }
+
+ gcc-dg-runtest $tests "$tagopt" ""
}
+unset offload_target
# See above.
set GCC_UNDER_TEST "$SAVE_GCC_UNDER_TEST"
unset lang_library_path
}
unset lang_link_flags
-unset lang_test_file_found
# All done.
torture-finish
load_gcc_lib gcc-dg.exp
load_gcc_lib gfortran-dg.exp
-set lang_test_file_found 0
if { $blddir != "" } {
set lang_library_path "../libgfortran/.libs"
set shlib_ext [get_shlib_extension]
- # Look for a static libgfortran first.
- if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
- set lang_test_file_found 1
- # We may have a shared only build, so look for a shared libgfortran.
- } elseif [file exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] {
- set lang_test_file_found 1
- } else {
- puts "No libgfortran library found, will not execute fortran tests"
+ if { ![file exists "${blddir}/${lang_library_path}/libgfortran.a"]
+ && ![file exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] } {
+ verbose -log "No libgfortran library found, will not execute fortran tests"
+ unset lang_library_path
+ return
}
-} elseif [info exists GFORTRAN_UNDER_TEST] {
- set lang_test_file_found 1
-} else {
- puts "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
+} elseif { ![info exists GFORTRAN_UNDER_TEST] } {
+ verbose -log "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
+ return
}
if { $blddir != "" } {
set lang_source_re {^.*\.[fF](|90|95|03|08)$}
lappend ALWAYS_CFLAGS "additional_flags=-fopenacc"
-if { $lang_test_file_found } {
- # Gather a list of all tests.
- set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
-
- if { $blddir != "" } {
- set quadmath_library_path "../libquadmath/.libs"
- if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
- || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
- lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
- # Allow for spec subsitution.
- lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/"
- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}"
- append lang_link_flags " -lquadmath"
- } else {
- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
- }
- unset quadmath_library_path
- } else {
- set ld_library_path "$always_ld_library_path"
- if { [check_no_compiler_messages has_libquadmath executable {
- int main() {return 0;}
- } "-lgfortran -lquadmath"] } then {
- append lang_link_flags " -lquadmath"
- }
+# Gather a list of all tests.
+set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
+
+set ld_library_path $always_ld_library_path
+if { $blddir != "" } {
+ append ld_library_path ":${blddir}/${lang_library_path}"
+
+ set quadmath_library_path "../libquadmath/.libs"
+ if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
+ || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
+ lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
+ # Allow for spec subsitution.
+ lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/"
+ append ld_library_path ":${blddir}/${quadmath_library_path}"
+ append lang_link_flags " -lquadmath"
}
- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
- set_ld_library_path_env_vars
-
- # Test with all available offload targets, and with offloading disabled.
- foreach offload_target [concat [split $offload_targets ","] "disable"] {
- global openacc_device_type
- set openacc_device_type [offload_target_to_openacc_device_type $offload_target]
- set tagopt "-DACC_DEVICE_TYPE_$openacc_device_type=1"
-
- switch $openacc_device_type {
- "" {
- unsupported "$subdir $offload_target offloading"
+ unset quadmath_library_path
+} else {
+ if { [check_no_compiler_messages has_libquadmath executable {
+ int main() {return 0;}
+ } "-lgfortran -lquadmath"] } then {
+ append lang_link_flags " -lquadmath"
+ }
+}
+append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+set_ld_library_path_env_vars
+
+# Test with all available offload targets, and with offloading disabled.
+foreach offload_target [concat [split $offload_targets ","] "disable"] {
+ global openacc_device_type
+ set openacc_device_type [offload_target_to_openacc_device_type $offload_target]
+ set tagopt "-DACC_DEVICE_TYPE_$openacc_device_type=1"
+
+ switch $openacc_device_type {
+ "" {
+ unsupported "$subdir $offload_target offloading"
+ continue
+ }
+ host {
+ set acc_mem_shared 1
+ }
+ nvidia {
+ if { ![check_effective_target_openacc_nvidia_accel_present] } {
+ # Don't bother; execution testing is going to FAIL.
+ untested "$subdir $offload_target offloading: supported, but hardware not accessible"
continue
}
- host {
- set acc_mem_shared 1
- }
- nvidia {
- if { ![check_effective_target_openacc_nvidia_accel_present] } {
- # Don't bother; execution testing is going to FAIL.
- untested "$subdir $offload_target offloading: supported, but hardware not accessible"
- continue
- }
-
- set acc_mem_shared 0
- }
- radeon {
- if { ![check_effective_target_openacc_radeon_accel_present] } {
- # Don't bother; execution testing is going to FAIL.
- untested "$subdir $offload_target offloading: supported, but hardware not accessible"
- continue
- }
-
- set acc_mem_shared 0
- }
- default {
- error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
+
+ set acc_mem_shared 0
+ }
+ radeon {
+ if { ![check_effective_target_openacc_radeon_accel_present] } {
+ # Don't bother; execution testing is going to FAIL.
+ untested "$subdir $offload_target offloading: supported, but hardware not accessible"
+ continue
}
+
+ set acc_mem_shared 0
+ }
+ default {
+ error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
}
- set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
-
- # To avoid compilation overhead, and to keep simple '-foffload=[...]'
- # handling in test cases, by default only build for the offload target
- # that we're actually going to test.
- set tagopt "$tagopt -foffload=$offload_target"
- # Force usage of the corresponding OpenACC device type.
- setenv ACC_DEVICE_TYPE $openacc_device_type
-
- # For Fortran we're doing torture testing, as Fortran has far more tests
- # with arrays etc. that testing just -O0 or -O2 is insufficient, that is
- # typically not the case for C/C++.
- gfortran-dg-runtest $tests "$tagopt" ""
}
- unset offload_target
+ set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
+
+ # To avoid compilation overhead, and to keep simple '-foffload=[...]'
+ # handling in test cases, by default only build for the offload target
+ # that we're actually going to test.
+ set tagopt "$tagopt -foffload=$offload_target"
+ # Force usage of the corresponding OpenACC device type.
+ setenv ACC_DEVICE_TYPE $openacc_device_type
+
+ # For Fortran we're doing torture testing, as Fortran has far more tests
+ # with arrays etc. that testing just -O0 or -O2 is insufficient, that is
+ # typically not the case for C/C++.
+ gfortran-dg-runtest $tests "$tagopt" ""
}
+unset offload_target
if { $blddir != "" } {
unset lang_source_re
unset lang_library_path
}
unset lang_link_flags
-unset lang_test_file_found
# All done.
dg-finish