Skip to content

Commit d7d3c88

Browse files
[Flang][OpenMP] Error gracefully for dependence-type with depobj
Also modifies the error message to specify it is the dependence-type that is not supported.
1 parent dec6324 commit d7d3c88

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

flang/lib/Lower/OpenMP/ClauseProcessor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ genDependKindAttr(lower::AbstractConverter &converter,
139139
break;
140140
case omp::clause::DependenceType::Mutexinoutset:
141141
case omp::clause::DependenceType::Inoutset:
142-
TODO(currentLocation, "INOUTSET and MUTEXINOUTSET are not supported yet");
143-
break;
144142
case omp::clause::DependenceType::Depobj:
143+
TODO(currentLocation,
144+
"INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types");
145+
break;
145146
case omp::clause::DependenceType::Sink:
146147
case omp::clause::DependenceType::Source:
147148
llvm_unreachable("unhandled parser task dependence type");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
!RUN: %not_todo_cmd bbc -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
2+
!RUN: %not_todo_cmd %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
3+
4+
!CHECK: not yet implemented: INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types
5+
6+
subroutine f00(x)
7+
integer :: x
8+
!$omp task depend(depobj: x)
9+
!$omp end task
10+
end

flang/test/Lower/OpenMP/Todo/depend-clause-inoutset.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
!RUN: %not_todo_cmd bbc -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
22
!RUN: %not_todo_cmd %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
33

4-
!CHECK: not yet implemented: INOUTSET and MUTEXINOUTSET are not supported yet
4+
!CHECK: not yet implemented: INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types
55
subroutine f00(x)
66
integer :: x
77
!$omp task depend(inoutset: x)

flang/test/Lower/OpenMP/Todo/depend-clause-mutexinoutset.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
!RUN: %not_todo_cmd bbc -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
22
!RUN: %not_todo_cmd %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
33

4-
!CHECK: not yet implemented: INOUTSET and MUTEXINOUTSET are not supported yet
4+
!CHECK: not yet implemented: INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types
55
subroutine f00(x)
66
integer :: x
77
!$omp task depend(mutexinoutset: x)

0 commit comments

Comments
 (0)