xref: /llvm-project/flang/test/Semantics/cuf-device-procedures02.cuf (revision 6d50a79b721760fa5e10b81ebe6d1e37f141f61b)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2
3module dev
4  integer, device :: syncthreads
5
6contains
7
8  attributes(device) subroutine sub1()
9    syncthreads = 1 ! syncthreads not overwritten by cudadevice
10  end subroutine
11
12  attributes(global) subroutine sub2()
13!ERROR: 'threadfence' is use-associated from module 'cudadevice' and cannot be re-declared
14    integer :: threadfence
15  end subroutine
16end module
17
18