2 ! { dg-additional-options "-cpp" }
4 ! { dg-additional-options "-fopt-info-all-omp" }
5 ! { dg-additional-options "--param=openacc-privatization=noisy" }
6 ! { dg-additional-options "-foffload=-fopt-info-all-omp" }
7 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
8 ! for testing/documenting aspects of that functionality.
10 ! TODO: Have to disable the acc_on_device builtin for we want to test the
11 ! libgomp library function? The command line option
12 ! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not for
20 if (.not
. acc_on_device (acc_device_none
)) STOP 1
21 if (.not
. acc_on_device (acc_device_host
)) STOP 2
22 if (acc_on_device (acc_device_not_host
)) STOP 3
23 if (acc_on_device (acc_device_nvidia
)) STOP 4
24 if (acc_on_device (acc_device_radeon
)) STOP 4
27 ! Host via offloading fallback mode.
29 !$acc parallel if(.false.)
30 ! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } .-1 }
31 !TODO Unhandled 'CONST_DECL' instances for constant arguments in 'acc_on_device' calls.
32 if (.not
. acc_on_device (acc_device_none
)) STOP 5
33 if (.not
. acc_on_device (acc_device_host
)) STOP 6
34 if (acc_on_device (acc_device_not_host
)) STOP 7
35 if (acc_on_device (acc_device_nvidia
)) STOP 8
36 if (acc_on_device (acc_device_radeon
)) STOP 8
40 #
if !ACC_DEVICE_TYPE_host
45 ! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target { ! openacc_host_selected } } .-1 }
46 if (acc_on_device (acc_device_none
)) STOP 9
47 if (acc_on_device (acc_device_host
)) STOP 10
48 if (.not
. acc_on_device (acc_device_not_host
)) STOP 11
49 #
if ACC_DEVICE_TYPE_nvidia
50 if (.not
. acc_on_device (acc_device_nvidia
)) STOP 12
52 if (acc_on_device (acc_device_nvidia
)) STOP 13
54 #
if ACC_DEVICE_TYPE_radeon
55 if (.not
. acc_on_device (acc_device_radeon
)) STOP 14
57 if (acc_on_device (acc_device_radeon
)) STOP 15