- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm finding the documentation on the -falias and -ffnalias rather unclear.
The standard prohibits aliasing of a dummy argument which is modified either to another dummy argument or to a module or common variable. According to the manual "-falias" to quote
"assumes aliasing". Does this mean that it assumes aliasing which does conform to the standard (for example the same array passed to two distinct INTENT(IN) arguments) or that the compiler can not assume the rules of the standard are followed by the program. And since the default is ON does this mean that the compiler is under-optimising standard-compliant programs by default?
In other words, is it (a) safe and (b) likely to improve performance by specifying -fno-alias on a standard-conforming program?
Finally, am I correct in guessing that -ffnalias refers to subroutine dummy arguments only but that -falias also includes aliasing by pointers?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are correct that Fortran, unlike C, has language rules that generally prohibit aliasing - or more precisiely, prohibit writing a program that could be affected by aliasing. (The rules are more complex in Fortran 90 and 95 than in F77.)
Compaq Fortran has had an "assume [no]dummy_aliases" option with a default of "assume there are no aliases". Specifying "assume dummy_aliases" disables some optimizations.
Steve

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page