This is an archive of the discontinued LLVM Phabricator instance.

[flang] [OpenMP 4.5] Add semantic checks for OpenMP Depend clause
ClosedPublic

Authored by praveen on Oct 21 2020, 11:46 PM.

Details

Summary

Add the semantic checks for the OpenMP 4.5 - 2.13.9 Depend clause.

  • List items in depend clause should not be zero length array sections
  • A variable that is part of another variable like structure component should not be specified on a depend clause

Test cases : omp-depend01.f90 , omp-depend02.f90

Diff Detail

Event Timeline

praveen created this revision.Oct 21 2020, 11:46 PM
praveen requested review of this revision.Oct 21 2020, 11:46 PM

Thanks for the patch. A few questions inline.

flang/lib/Semantics/check-omp-structure.cpp
634

Can you check whether this is dropped from OpenMP 5.0. If so I would prefer to skip this check.

641

Can you add a test for this error?
Is this restriction from some other section or from a general point that Fortran features like Block, coarrays etc are not supported?

flang/lib/Semantics/check-omp-structure.h
167–168

Can these be private?

kiranchandramohan requested changes to this revision.Nov 12 2020, 5:52 AM

Would need a response for questions above to proceed to acceptance.

This revision now requires changes to proceed.Nov 12 2020, 5:52 AM
praveen updated this revision to Diff 304887.Nov 12 2020, 10:21 AM

Add test case omp-depend03.f90 for usage of coarray in the depend clause

This revision is now accepted and ready to land.Nov 13 2020, 7:33 AM