! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s ! Test detection of CUDA Fortran data transfer in presence of associuate ! statement. module m real(8), device, dimension(10,10,10) :: d end module m subroutine foo use m !@CUF associate(d1 => d) d1 = 0.0 !@CUF end associate end subroutine ! CHECK-LABEL: func.func @_QPfoo() ! CHECK: %[[D:.*]] = fir.address_of(@_QMmEd) : !fir.ref> ! CHECK: %[[D_DECL:.*]]:2 = hlfir.declare %[[D]](%{{.*}}) {data_attr = #cuf.cuda, uniq_name = "_QMmEd"} : (!fir.ref>, !fir.shape<3>) -> (!fir.ref>, !fir.ref>) ! CHECK: %[[D1_DECL:.*]]:2 = hlfir.declare %[[D_DECL]]#0(%4) {uniq_name = "_QFfooEd1"} : (!fir.ref>, !fir.shape<3>) -> (!fir.ref>, !fir.ref>) ! CHECK: cuf.data_transfer %{{.*}} to %[[D1_DECL]]#0 {transfer_kind = #cuf.cuda_transfer} : f64, !fir.ref>