Skip to content

Conversation

@kiranchandramohan
Copy link
Contributor

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.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp labels Nov 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 18, 2024

@llvm/pr-subscribers-flang-openmp

@llvm/pr-subscribers-flang-fir-hlfir

Author: Kiran Chandramohan (kiranchandramohan)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/116621.diff

4 Files Affected:

  • (modified) flang/lib/Lower/OpenMP/ClauseProcessor.cpp (+2-2)
  • (added) flang/test/Lower/OpenMP/Todo/depend-clause-depobj.f90 (+10)
  • (modified) flang/test/Lower/OpenMP/Todo/depend-clause-inoutset.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/Todo/depend-clause-mutexinoutset.f90 (+1-1)
diff --git a/flang/lib/Lower/OpenMP/ClauseProcessor.cpp b/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
index dd0068deb94265..993acd81f55690 100644
--- a/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+++ b/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
@@ -139,9 +139,9 @@ genDependKindAttr(lower::AbstractConverter &converter,
     break;
   case omp::clause::DependenceType::Mutexinoutset:
   case omp::clause::DependenceType::Inoutset:
-    TODO(currentLocation, "INOUTSET and MUTEXINOUTSET are not supported yet");
-    break;
   case omp::clause::DependenceType::Depobj:
+    TODO(currentLocation, "INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types");
+    break;
   case omp::clause::DependenceType::Sink:
   case omp::clause::DependenceType::Source:
     llvm_unreachable("unhandled parser task dependence type");
diff --git a/flang/test/Lower/OpenMP/Todo/depend-clause-depobj.f90 b/flang/test/Lower/OpenMP/Todo/depend-clause-depobj.f90
new file mode 100644
index 00000000000000..3bc730f849192b
--- /dev/null
+++ b/flang/test/Lower/OpenMP/Todo/depend-clause-depobj.f90
@@ -0,0 +1,10 @@
+!RUN: %not_todo_cmd bbc -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
+!RUN: %not_todo_cmd %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
+
+!CHECK: not yet implemented: INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types
+
+subroutine f00(x)
+  integer :: x
+  !$omp task depend(depobj: x)
+  !$omp end task
+end
diff --git a/flang/test/Lower/OpenMP/Todo/depend-clause-inoutset.f90 b/flang/test/Lower/OpenMP/Todo/depend-clause-inoutset.f90
index 017df006308331..160893fccdc5f2 100644
--- a/flang/test/Lower/OpenMP/Todo/depend-clause-inoutset.f90
+++ b/flang/test/Lower/OpenMP/Todo/depend-clause-inoutset.f90
@@ -1,7 +1,7 @@
 !RUN: %not_todo_cmd bbc -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
 !RUN: %not_todo_cmd %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
 
-!CHECK: not yet implemented: INOUTSET and MUTEXINOUTSET are not supported yet
+!CHECK: not yet implemented: INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types
 subroutine f00(x)
   integer :: x
   !$omp task depend(inoutset: x)
diff --git a/flang/test/Lower/OpenMP/Todo/depend-clause-mutexinoutset.f90 b/flang/test/Lower/OpenMP/Todo/depend-clause-mutexinoutset.f90
index 2f6ff77b20a88c..17cc3894c548f1 100644
--- a/flang/test/Lower/OpenMP/Todo/depend-clause-mutexinoutset.f90
+++ b/flang/test/Lower/OpenMP/Todo/depend-clause-mutexinoutset.f90
@@ -1,7 +1,7 @@
 !RUN: %not_todo_cmd bbc -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
 !RUN: %not_todo_cmd %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -o - %s 2>&1 | FileCheck %s
 
-!CHECK: not yet implemented: INOUTSET and MUTEXINOUTSET are not supported yet
+!CHECK: not yet implemented: INOUTSET, MUTEXINOUTSET and DEPOBJ dependence-types
 subroutine f00(x)
   integer :: x
   !$omp task depend(mutexinoutset: x)

@github-actions
Copy link

github-actions bot commented Nov 18, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Also modifies the error message to specify it is the dependence-type
that is not supported.
Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@kiranchandramohan kiranchandramohan merged commit dcd6207 into llvm:main Nov 18, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:fir-hlfir flang:openmp flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants