diff options
author | Tom Eccles <tom.eccles@arm.com> | 2024-07-22 16:05:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-22 16:05:17 +0100 |
commit | 2e6558b8bcdaa4c0924f1f49a9200cb2dea44bd4 (patch) | |
tree | ed5548530ec2c2e2bfe8e4a5b9f085307f7db5d7 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | ca3d4dfe0c8844a8010751c51600a3bd3f6f80a4 (diff) | |
download | llvm-2e6558b8bcdaa4c0924f1f49a9200cb2dea44bd4.zip llvm-2e6558b8bcdaa4c0924f1f49a9200cb2dea44bd4.tar.gz llvm-2e6558b8bcdaa4c0924f1f49a9200cb2dea44bd4.tar.bz2 |
[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.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions