[all-commits] [llvm/llvm-project] 8870ce: [flang][docs] Add note about Cray pointers and the...
Asher Mancinelli via All-commits
all-commits at lists.llvm.org
Mon May 5 08:32:30 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8870ce1aa0ddf4df4f25ae834a1fab167895892d
https://github.com/llvm/llvm-project/commit/8870ce1aa0ddf4df4f25ae834a1fab167895892d
Author: Asher Mancinelli <ashermancinelli at gmail.com>
Date: 2025-05-05 (Mon, 05 May 2025)
Changed paths:
M flang/docs/Aliasing.md
Log Message:
-----------
[flang][docs] Add note about Cray pointers and the TARGET attribute (#137993)
We found some tests checking for loops assigning between Cray pointer
handles and their pointees which produced "incorrect" results with
optimizations enabled; this is because the compiler expects Cray
pointers not to alias with any other entity.
[The HPE documentation for Cray Fortran extensions
specifies:](https://support.hpe.com/hpesc/public/docDisplay?docId=a00113911en_us&docLocale=en_US&page=Types.html#cray-poiter-type)
> the compiler assumes that the storage of a pointee is
> never overlaid on the storage of another variable
Jean pointed out that if a user's code uses entities that alias via Cray
pointers, they may add the TARGET attribute to inform Flang of this
aliasing, but that Flang's behavior is in line with Cray's own
documentation and we should not make any changes to our alias analysis
to try and detect this case.
Updating documentation so that users that encounter this situation have
a way to allow their code to compile as they intend.
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