Skip to content

Conversation

@tblah
Copy link
Contributor

@tblah tblah commented Jan 22, 2025

It looks like in most cases we still don't make calls to deallocate allocatable members of derived types which have been privatized.

This is just intended to add a test for the one case where we do, to make sure this doesn't regress with my upcoming changes.

It looks like in most cases we still don't make calls to deallocate
allocatable members of derived types which have been privatized.

This is just intended to add a test for the one case where we do, to
make sure this doesn't regress with my upcoming changes.
@tblah tblah requested a review from luporl January 22, 2025 21:33
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp labels Jan 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 22, 2025

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

Author: Tom Eccles (tblah)

Changes

It looks like in most cases we still don't make calls to deallocate allocatable members of derived types which have been privatized.

This is just intended to add a test for the one case where we do, to make sure this doesn't regress with my upcoming changes.


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

1 Files Affected:

  • (modified) flang/test/Lower/OpenMP/derived-type-allocatable.f90 (+3)
diff --git a/flang/test/Lower/OpenMP/derived-type-allocatable.f90 b/flang/test/Lower/OpenMP/derived-type-allocatable.f90
index 2dc4e20f27af21..1d6e22212eedd0 100644
--- a/flang/test/Lower/OpenMP/derived-type-allocatable.f90
+++ b/flang/test/Lower/OpenMP/derived-type-allocatable.f90
@@ -24,6 +24,9 @@ module m1
 !CHECK-LABEL: omp.private {type = private} @_QMm1Ftest_array_of_allocs
 !CHECK:       fir.call @_FortranAInitializeClone
 !CHECK-NEXT:  omp.yield
+!CHECK:       } dealloc {
+!CHECK:       fir.call @_FortranAAllocatableDeallocate
+!CHECK:       omp.yield
 
 !CHECK-LABEL: omp.private {type = firstprivate} @_QMm1Ftest_array
 !CHECK-NOT:   fir.call @_FortranAInitializeClone

@llvmbot
Copy link
Member

llvmbot commented Jan 22, 2025

@llvm/pr-subscribers-flang-openmp

Author: Tom Eccles (tblah)

Changes

It looks like in most cases we still don't make calls to deallocate allocatable members of derived types which have been privatized.

This is just intended to add a test for the one case where we do, to make sure this doesn't regress with my upcoming changes.


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

1 Files Affected:

  • (modified) flang/test/Lower/OpenMP/derived-type-allocatable.f90 (+3)
diff --git a/flang/test/Lower/OpenMP/derived-type-allocatable.f90 b/flang/test/Lower/OpenMP/derived-type-allocatable.f90
index 2dc4e20f27af21..1d6e22212eedd0 100644
--- a/flang/test/Lower/OpenMP/derived-type-allocatable.f90
+++ b/flang/test/Lower/OpenMP/derived-type-allocatable.f90
@@ -24,6 +24,9 @@ module m1
 !CHECK-LABEL: omp.private {type = private} @_QMm1Ftest_array_of_allocs
 !CHECK:       fir.call @_FortranAInitializeClone
 !CHECK-NEXT:  omp.yield
+!CHECK:       } dealloc {
+!CHECK:       fir.call @_FortranAAllocatableDeallocate
+!CHECK:       omp.yield
 
 !CHECK-LABEL: omp.private {type = firstprivate} @_QMm1Ftest_array
 !CHECK-NOT:   fir.call @_FortranAInitializeClone

Copy link
Contributor

@luporl luporl left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@tblah tblah merged commit 9cf52fe into main Jan 24, 2025
12 checks passed
@tblah tblah deleted the users/tblah/delayed-task-exec-0 branch January 24, 2025 14:48
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