2 ! { dg-options "-fcoarray=lib -lcaf_single" }
3 ! { dg-additional-options "-latomic" { target libatomic_available } }
5 program check_caf_send_by_ref
10 integer, allocatable :: scal
11 integer, allocatable :: array(:)
14 type(T), save :: obj[*]
22 ! Check the token for the scalar is set.
23 if (obj[np]%scal /= 42) STOP 1
25 ! Now the same for arrays.
26 obj[np]%array = [(i * np + me, i = 1, 15)]
27 if (any(obj[np]%array /= [(i * np + me, i = 1, 15)])) STOP 2
29 end program check_caf_send_by_ref