]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gfortran.dg/goacc/host_data-tree.f95
Further changes for the OpenACC 'if_present' clause on the 'host_data' construct
[thirdparty/gcc.git] / gcc / testsuite / gfortran.dg / goacc / host_data-tree.f95
1 ! { dg-additional-options "-fdump-tree-original -fdump-tree-gimple" }
2
3 program test
4 implicit none
5 integer, pointer :: p
6
7 !$acc host_data use_device(p)
8 ! { dg-final { scan-tree-dump-times "(?n)#pragma acc host_data use_device_ptr\\(p\\)$" 1 "original" } }
9 ! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_host_data use_device_ptr\\(p\\)$" 1 "gimple" } }
10 !$acc end host_data
11
12 !$acc host_data use_device(p) if (p == 42)
13 ! { dg-final { scan-tree-dump-times "(?n)D\\.\[0-9\]+ = \\*p == 42;$" 1 "original" } }
14 ! { dg-final { scan-tree-dump-times "(?n)#pragma acc host_data use_device_ptr\\(p\\) if\\(D\\.\[0-9\]+\\)$" 1 "original" } }
15 ! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_host_data use_device_ptr\\(p\\) if\\(D\\.\[0-9\]+\\)$" 1 "gimple" } }
16 !$acc end host_data
17
18 !$acc host_data use_device(p) if_present if (p == 43)
19 ! { dg-final { scan-tree-dump-times "(?n)D\\.\[0-9\]+ = \\*p == 43;$" 1 "original" } }
20 ! { dg-final { scan-tree-dump-times "(?n)#pragma acc host_data use_device_ptr\\(p\\) if\\(D\\.\[0-9\]+\\) if_present$" 1 "original" } }
21 ! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_host_data use_device_ptr\\(if_present:p\\) if\\(D\\.\[0-9\]+\\) if_present$" 1 "gimple" } }
22 !$acc end host_data
23 end program test