llvm-project/flang/test/Semantics/OpenACC/acc-default-none-function.f90
Andre Kuhlenschmidt be449d6b65
[flang][openacc] fix a bug with checking data mapping clause when there is no default (#151419)
Test case used to complain about `dosomething` requiring a data mapping
clause. Now no such error exists.
2025-07-30 22:51:09 -07:00

21 lines
439 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang -fopenacc -pedantic
module mm_acc_rout_function
contains
integer function dosomething(res)
!$acc routine seq
integer :: res
dosomething = res + 1
end function
end module
program main
use mm_acc_rout_function
implicit none
integer :: res = 1
!$acc serial default(none) copy(res)
res = dosomething(res)
!$acc end serial
end program