4 ms·
Pointers in Fortran can alias with each other and with valid pointer targets. What makes Fortran potentially easier to optimize are its rules against dummy arg
by pklausler 3y ago
Pointers in Fortran can alias with each other and with valid pointer targets. What makes Fortran potentially easier to optimize are its rules against dummy argument aliasing in most (but not all) cases.
(See https://github.com/llvm/llvm-project/blob/main/flang/docs/Aliasing.md https://github.com/llvm/llvm-project/blob/main/flang/docs/Al... for the full story.)
- cscheid 3y ago> dummy argument aliasing Thanks for the precise Fortran terminology; that's what I meant to say in my head but you're correct. From the linked website for everyone else: "Fortran famously passes actual arguments by reference, and forbids callers from associating multiple arguments on a call to conflicting storage when doing so would cause the called subprogram to write to a bit of that storage by means of one dummy argument and read or write that same bit by means of another."