Skip to content

Commit dcd6207

Browse files
[Flang][OpenMP] Error gracefully for dependence-type with depobj (#116621)
It also modifies the error message to specify it is the dependence-type that is not supported. Resolves the crash in #115647. A fix can come in later as part of future OpenMP version support.
1 parent 52361d0 commit dcd6207

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
@@ -158,9 +158,10 @@ genDependKindAttr(lower::AbstractConverter &converter,
158158
break;
159159
case omp::clause::DependenceType::Mutexinoutset:
160160
case omp::clause::DependenceType::Inoutset:
161-
TODO(currentLocation, "INOUTSET and MUTEXINOUTSET are not supported yet");
162-
break;
163161
case omp::clause::DependenceType::Depobj:
162+
TODO(currentLocation,
163+
"INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types");
164+
break;
164165
case omp::clause::DependenceType::Sink:
165166
case omp::clause::DependenceType::Source:
166167
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)