Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / pr90030.f90
blobbbfcff3a869f72d4574bf8ef8aa6acb3ad42347c
1 ! PR90030.
2 ! Test if the array data associated with c is properly aligned
3 ! on the accelerator. If it is not, this program will crash.
5 ! This is also included from '../libgomp.fortran/pr90030.f90'.
7 ! { dg-do run }
9 program routine_align_main
10 implicit none
11 integer :: i, n
12 real*8, dimension(:), allocatable :: c
14 n = 10
16 allocate (c(n))
18 !$omp target map(to: n) map(from: c(1:n))
19 !$acc parallel copyin(n) copyout(c(1:n))
20 do i = 1, n
21 c(i) = i
22 enddo
23 !$acc end parallel
24 !$omp end target
26 do i = 1, n
27 if (c(i) .ne. i) stop i
28 enddo
29 end program routine_align_main