brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 8c03c18 Raw
56 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenacc2 3module devicemod4  real, constant :: c(10)5end module6 7program test8  use devicemod9  real, device :: a(10)10  real, managed :: m(10)11  a = 1.012!ERROR: device data not allowed in I/O statements13  print *, a(1)14!ERROR: device data not allowed in I/O statements15  print *, a16 17  print*, m(9) ! ok18  print*, m ! ok19 20!ERROR: device data not allowed in I/O statements21  print*, c22!ERROR: device data not allowed in I/O statements23  print*, c(5)24end25 26subroutine host()27  integer :: i28  real, device :: a(10)29  !$acc parallel loop30  do i = 1, 1031    print*, a(i) ! ok32  end do33 34  !$cuf kernel do35  do i = 1, 1036    print*, a(i) ! ok37  end do38end subroutine39 40attributes(global) subroutine global1()41  real, device :: a(10)42  print*, a ! ok43end subroutine44 45attributes(device) subroutine device1()46  real, device :: a(10)47  print*, a ! ok48end subroutine49 50attributes(global) subroutine global_with_block()51  block52    real, device :: a(10)53    print*, a ! ok54  end block55end subroutine56