Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

-falias and -ffnalias

Keith_R_
Novice
518 Views

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?


 

0 Kudos
1 Reply
Steven_L_Intel1
Employee
518 Views
You raise an interesting question - one I don't know the answer to offhand. I will investigate and find out.

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
0 Kudos
Reply