[flang-commits] [flang] [flang] Apply nocapture attribute to dummy arguments (PR #116182)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Wed Nov 20 08:32:09 PST 2024
klausler wrote:
> > Is it correct to apply `nocapture` to a dummy argument that was originally a return value?
>
> It actually seems correct to me to add `nocapture` to hidden arguments of results because pointer associations made with the result entity inside the procedure should be undefined after the call (The standard reference for that should be somewhere in F2023 19.5.2.5, I cannot find what exactly, but it would make no sense otherwise. @klausler do you agree?).
Function result variables don't seem to me to be any different from other local variables in this respect.
https://github.com/llvm/llvm-project/pull/116182
More information about the flang-commits
mailing list