Valentin Clement (バレンタイン クレメン) 1345ee4232
[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)
Dummy arguments with the VALUE attribute do not need the implicit data
attribute.
2024-12-13 14:41:49 -08:00

49 lines
1.0 KiB
Plaintext

! RUN: %python %S/test_modfile.py %s %flang_fc1
! Sanity check for CUDA Fortran attributes in module files
module m
attributes(device) dd
real, managed, allocatable :: md
real, pinned, allocatable :: mp
attributes(constant) cd
contains
attributes(global) subroutine globsub(x,y,z)
real, value :: x
real, device :: y
real, managed :: z
end subroutine
attributes(host,device) real function foo(x)
foo = x + 1.
end function
attributes(host) subroutine hostsub(a)
integer, intent(out) :: a(14)
a = 99
end subroutine
end
!Expect: m.mod
!module m
!real(4)::dd
!attributes(device) dd
!real(4),allocatable::md
!attributes(managed) md
!real(4),allocatable::mp
!attributes(pinned) mp
!real(4)::cd
!attributes(constant) cd
!contains
!attributes(global) subroutine globsub(x,y,z)
!real(4),value::x
!real(4)::y
!attributes(device) y
!real(4)::z
!attributes(managed) z
!end
!attributes(host,device) function foo(x)
!real(4)::x
!real(4)::foo
!end
attributes(host)subroutinehostsub(a)
integer(4),intent(out)::a(1_8:14_8)
end
!end