[PATCH] D92732: [Flang][OpenMP 4.5] Add semantic check for OpenMP Do Loop Constructs

Yashaswini Hegde via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 10:41:58 PST 2021


yhegde added inline comments.


================
Comment at: flang/test/Semantics/omp-do13.f90:1
+! RUN: %S/test_errors.sh %s %t %f18 -fopenmp
+! OpenMP Version 4.5
----------------
yhegde wrote:
> kiranchandramohan wrote:
> > Please add a test for an openmp do loop with collapse nested inside an openmp do loop with collapse.
> ok.
> Please add a test for an openmp do loop with collapse nested inside an openmp do loop with collapse.

Added a case like this . Hope this is what is suggested.

!$omp do  collapse(2)
  foo: do i = 0, 10
    foo1: do j = 0, 10
      !ERROR: CYCLE statement to non-innermost collapsed !$OMP DO loop
      cycle foo
      !ERROR: A worksharing region may not be closely nested inside a worksharing, explicit task, taskloop, critical, ordered, atomic, or master region
      !$omp do  collapse(1)
      foo2:  do k  = 0, 10
        print *, i, j, k
        end do foo2
     !$omp end do
     end do foo1
  end do foo
  !$omp end do



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92732/new/

https://reviews.llvm.org/D92732



More information about the llvm-commits mailing list