xref: /llvm-project/flang/test/Semantics/cuf06.cuf (revision f674ddc19fee67401b78f360e530bb064aa31ed8)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2module m
3  use, intrinsic :: __fortran_builtins, only: __builtin_dim3
4 contains
5  attributes(global) subroutine kernel
6  end subroutine
7  subroutine test
8    call kernel<<< 1, 32 >>> ! ok
9    call kernel<<< __builtin_dim3(1,1), __builtin_dim3(32,1,1) >>> ! ok
10    !ERROR: Kernel launch grid parameter must be either integer or TYPE(dim3)
11    call kernel<<< 1.d0, 32 >>>
12    !ERROR: Kernel launch block parameter must be either integer or TYPE(dim3)
13    call kernel<<< 1, "abc" >>>
14  end
15end module
16