]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
[libgomp] Clarify difference between offload target, offload plugin, and OpenACC...
[thirdparty/gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / fortran.exp
index a262a8a2c9703a7d9a81392daa64de33c4267ce7..83f4f6b47d8adfe091f6a2401227f7c45d224abd 100644 (file)
@@ -65,30 +65,31 @@ if { $lang_test_file_found } {
     append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
     set_ld_library_path_env_vars
 
-    # Test OpenACC with available accelerators.
-    foreach offload_target_openacc $offload_targets_s_openacc {
-       set tagopt "-DACC_DEVICE_TYPE_$offload_target_openacc=1"
+    # Test with available OpenACC device types.
+    global openacc_device_type
+    foreach openacc_device_type $openacc_device_types_s {
+       set tagopt "-DACC_DEVICE_TYPE_$openacc_device_type=1"
 
-       switch $offload_target_openacc {
+       switch $openacc_device_type {
            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_openacc offloading: supported, but hardware not accessible"
+                   untested "$subdir $openacc_device_type offloading: supported, but hardware not accessible"
                    continue
                }
 
                set acc_mem_shared 0
            }
            default {
-               error "Unknown OpenACC device type: $offload_target_openacc"
+               error "Unknown OpenACC device type: $openacc_device_type"
            }
        }
        set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
 
-       setenv ACC_DEVICE_TYPE $offload_target_openacc
+       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