[flang-commits] [flang] [flang][OpenMP] Add OpenMP versions to some tests (PR #89295)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon Apr 22 09:06:52 PDT 2024


kiranchandramohan wrote:

> > > Add a flag with the minimum required OpenMP version (other than the default version) to these tests that need it
> > > -fopenmp-version=52
> > 
> > 
> > If I remember correctly, this flag is only used for debug or offload purposes only right? We do not distinguish between openmp versions inside the compiler, right?
> 
> OMP.h.inc defines the function
> 
> ```
> bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version);
> ```
> 
> I use that function to implement the parts of the spec that say something along the lines of "clause applies to the first construct that allows it".

Would it be OK to assume the latest version i.e. 5.2 or 6 and implement this?
Traditionally, in Flang, there has been no version-specific handling. So this might need a quick discussion with others. Also, what is the scope of the versioning that you are planning? Is it starting from 4.5 or 5.0? Or is it starting from 1.1?

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


More information about the flang-commits mailing list