Semantic check for OpenMP 4.5 - 2.7.1 schedule clause
Test cases : omp-do-schedule.f90
Differential D89546
[Flang][OpenMP 4.5] Add semantic check for OpenMP schedule clause yhegde on Oct 16 2020, 5:56 AM. Authored by
Details Semantic check for OpenMP 4.5 - 2.7.1 schedule clause Test cases : omp-do-schedule.f90
Diff Detail
Event TimelineComment Actions Thanks for this patch. If I understand correctly all of the cases cannot be caught since the standard does not require it to be a constant expression. Can you add a few more tests which
integer, parameter :: xx = 1 integer, parameter :: yy = 1 !$omp do schedule(STATIC, xx - yy)
subroutine sb(xx, yy) integer :: xx integer :: yy !$omp do schedule(STATIC, xx - yy) integer :: xx !$omp do schedule(STATIC, xx - xx)
Comment Actions
Comment Actions Fair enough. What about modifying RequiresPositiveParameter() to take optional custom error message so we can share the code?
Comment Actions LGTM. Have a nit comment inline about how to construct the message.
Comment Actions If RPP () function constructed like this const C &clause, const parser::ScalarIntExpr &i, llvm::StringRef paramName="parameter"); It wont break the test cases. Otherwise suggested change requires fixes in ERROR messages of previous test cases also. Shall I go ahead with this ? Comment Actions
|
Nits:
"The %s of the %s clause must be "
"a positive integer expression"_err_en_US,
paramName.str(),
parser::ToUpperCaseLetters(getClauseName(clause).str()))