[Mlir-commits] [mlir] [mlir][OpenMP] allow cancellation to not be directly nested (PR #134084)

Tom Eccles llvmlistbot at llvm.org
Wed Apr 2 08:49:40 PDT 2025


tblah wrote:

> subroutine one
> !$omp parallel do
> do i = 1, N
>   if (cond) then
>     call two()
>   endif
> enddo
> end subroutine
> 
> subroutine two
>   !$omp cancel do
> end subroutine

My reading of the standard seems to allow this, but classic flang and gfortran both refuse to compile it, along with clang and gcc (after rewriting in c++). Clang, gfortran and gcc all describe the cancel construct as "orphaned".

https://github.com/llvm/llvm-project/pull/134084


More information about the Mlir-commits mailing list