[all-commits] [llvm/llvm-project] 2e6558: [flang][OpenMP] fix lastprivate for allocatables (...
Tom Eccles via All-commits
all-commits at lists.llvm.org
Mon Jul 22 08:05:39 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e6558b8bcdaa4c0924f1f49a9200cb2dea44bd4
https://github.com/llvm/llvm-project/commit/2e6558b8bcdaa4c0924f1f49a9200cb2dea44bd4
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
A flang/test/Lower/OpenMP/lastprivate-allocatable.f90
Log Message:
-----------
[flang][OpenMP] fix lastprivate for allocatables (#99686)
Don't use `copyHostAssociateVar` for allocatable variables. It isn't
clear to me whether or not this should be addressed in
`copyHostAssociateVar` instead of inside OpenMP. I opted for OpenMP
to minimise how many things I effected. `copyHostAssociateVar` will
not update the destination variable if the destination variable
was unallocated. This is incorrect because assignment inside of the
openmp block can cause the allocation status of the variable to
change. Furthermore, `copyHostAssociateVar` seems to only copy the
variable address not other metadata like the size of the allocation.
Reallocation by assignment could cause this to change.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list