File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4969,7 +4969,7 @@ void OmpStructureChecker::CheckTraitSetSelector(
4969
4969
void OmpStructureChecker::CheckTraitScore (const parser::OmpTraitScore &score) {
4970
4970
// [6.0:322:23]
4971
4971
// A score-expression must be a non-negative constant integer expression.
4972
- if (auto value{GetIntValue (score)}; !value || value <= 0 ) {
4972
+ if (auto value{GetIntValue (score)}; !value || value < 0 ) {
4973
4973
context_.Say (score.source ,
4974
4974
" SCORE expression must be a non-negative constant integer expression" _err_en_US);
4975
4975
}
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ subroutine f02
21
21
! $omp & when(user={condition(score(-2): .true.)}: nothing)
22
22
end
23
23
24
+ subroutine f02_zero_score
25
+ ! $omp metadirective &
26
+ ! $omp & when(user={condition(score(0): .true.)}: nothing)
27
+ end
28
+
24
29
subroutine f03 (x )
25
30
integer :: x
26
31
! $omp metadirective &
You can’t perform that action at this time.
0 commit comments