1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
! { dg-do compile } program test implicit none integer :: i !$acc declare copy(i) contains real function foo(n) integer, value :: n BLOCK integer i !$acc declare copy(i) ! { dg-error "is not allowed" } END BLOCK end function foo end program test