Skip to content

Commit d36bd6a

Browse files
committed
Fix version comment
1 parent f00d196 commit d36bd6a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4624,9 +4624,11 @@ void OmpStructureChecker::CheckWorkshareBlockStmts(
46244624
void OmpStructureChecker::CheckWorkdistributeBlockStmts(
46254625
const parser::Block &block, parser::CharBlock source) {
46264626
unsigned version{context_.langOptions().OpenMPVersion};
4627-
if (version < 60)
4627+
unsigned since{60};
4628+
if (version < since)
46284629
context_.Say(source,
4629-
"WORKDISTRIBUTE construct is only supported from openMP 6.0"_err_en_US);
4630+
"WORKDISTRIBUTE construct is not allowed in %s, %s"_err_en_US,
4631+
ThisVersion(version), TryVersion(since));
46304632

46314633
OmpWorkdistributeBlockChecker ompWorkdistributeBlockChecker{context_, source};
46324634

flang/test/Semantics/OpenMP/workdistribute04.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ subroutine teams_workdistribute()
88
real(kind=real32) :: a
99
real(kind=real32), dimension(10) :: x
1010
real(kind=real32), dimension(10) :: y
11-
!ERROR: WORKDISTRIBUTE construct is only supported from openMP 6.0
11+
!ERROR: WORKDISTRIBUTE construct is not allowed in OpenMP v5.0, try -fopenmp-version=60
1212
!$omp teams workdistribute
1313
y = a * x + y
1414
!$omp end teams workdistribute

0 commit comments

Comments
 (0)