Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / pr109622-4.f90
blob3198a0bbf79f207d3f3087fa2ab97864aa7e697e
1 ! { dg-do run }
3 use openacc
4 implicit none
6 type t
7 integer :: foo
8 character(len=8), pointer :: bar
9 character(len=4), allocatable :: qux
10 end type t
12 type(t) :: var
13 character(len=8), target :: tgt
15 allocate(var%qux)
17 var%bar => tgt
19 var%foo = 99
20 tgt = "Octopus!"
21 var%qux = "Fish"
23 !$acc enter data copyin(var, tgt)
25 ! Avoid automatic attach (i.e. with "enter data")
26 call acc_copyin (var%qux)
28 !$acc enter data attach(var%bar, var%qux)
30 !$acc serial
31 ! { dg-warning "using .vector_length \\(32\\)., ignoring 1" "" { target openacc_nvidia_accel_selected } .-1 }
32 var%foo = 5
33 var%bar = "Plankton"
34 var%qux = "Pond"
35 !$acc end serial
37 !$acc exit data detach(var%bar, var%qux)
39 call acc_copyout (var%qux)
41 !$acc exit data copyout(var, tgt)
43 if (var%foo.ne.5) stop 1
44 if (tgt.ne."Plankton") stop 2
45 if (var%qux.ne."Pond") stop 3
47 end