brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 2338b74 Raw
49 lines · plain
1! RUN: %python %S/test_modfile.py %s %flang_fc12! Sanity check for CUDA Fortran attributes in module files3module m4  attributes(device) dd5  real, managed, allocatable :: md6  real, pinned, allocatable :: mp7  attributes(constant) cd8 contains9  attributes(global) subroutine globsub(x,y,z)10    real, value :: x11    real, device :: y12    real, managed :: z13  end subroutine14  attributes(host,device) real function foo(x)15    foo = x + 1.16  end function17  attributes(host) subroutine hostsub(a)18    integer, intent(out) :: a(14)19    a = 9920  end subroutine21end22 23!Expect: m.mod24!module m25!real(4)::dd26!attributes(device) dd27!real(4),allocatable::md28!attributes(managed) md29!real(4),allocatable::mp30!attributes(pinned) mp31!real(4)::cd32!attributes(constant) cd33!contains34!attributes(global) subroutine globsub(x,y,z)35!real(4),value::x36!real(4)::y37!attributes(device) y38!real(4)::z39!attributes(managed) z40!end41!attributes(host,device) function foo(x)42!real(4)::x43!real(4)::foo44!end45attributes(host)subroutinehostsub(a)46integer(4),intent(out)::a(1_8:14_8)47end48!end49