1! RUN: %python %S/test_modfile.py %s %flang_fc1 2! Sanity check for CUDA Fortran attributes in module files 3module m 4 attributes(device) dd 5 real, managed, allocatable :: md 6 real, pinned, allocatable :: mp 7 attributes(constant) cd 8 contains 9 attributes(global) subroutine globsub(x,y,z) 10 real, value :: x 11 real, device :: y 12 real, managed :: z 13 end subroutine 14 attributes(host,device) real function foo(x) 15 foo = x + 1. 16 end function 17 attributes(host) subroutine hostsub(a) 18 integer, intent(out) :: a(14) 19 a = 99 20 end subroutine 21end 22 23!Expect: m.mod 24!module m 25!real(4)::dd 26!attributes(device) dd 27!real(4),allocatable::md 28!attributes(managed) md 29!real(4),allocatable::mp 30!attributes(pinned) mp 31!real(4)::cd 32!attributes(constant) cd 33!contains 34!attributes(global) subroutine globsub(x,y,z) 35!real(4),value::x 36!real(4)::y 37!attributes(device) y 38!real(4)::z 39!attributes(managed) z 40!end 41!attributes(host,device) function foo(x) 42!real(4)::x 43!real(4)::foo 44!end 45attributes(host)subroutinehostsub(a) 46integer(4),intent(out)::a(1_8:14_8) 47end 48!end 49