Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / optional-cache.f95
blob0d48e2bd78621d16b5f611345d56dba287e2b868
1 ! { dg-do run }
2 ! Test that the cache directives work with optional arguments. The effect
3 ! of giving a non-present argument to the cache directive is not tested as
4 ! it is undefined. The test is based on gfortran.dg/goacc/cache-1.f95.
6 ! { dg-additional-options "-std=f2008" }
8 program cache_test
9 implicit none
10 integer :: d(10), e(7,13)
12 call do_test(d, e)
13 contains
14 subroutine do_test(d, e)
15 integer, optional :: d(10), e(7,13)
16 integer :: i
17 do concurrent (i=1:5)
18 !$acc cache (d(1:3))
19 !$acc cache (d(i:i+2))
20 !$acc cache (e(1:3,2:4))
21 !$acc cache (e(i:i+2,i+1:i+3))
22 enddo
23 end
24 end