Comment Re:Fortran optimizes well because... (Score 1) 745
It optimises well because it assumes/requires no aliasing.
You can/could always alias by passing a variable (or an array) into a function twice. That is:
f(a,a)
You can/could always alias by passing a variable (or an array) into a function twice. That is:
f(a,a)
This is illegal under the spec (at least up to F77), and the optimisers could work on the assumption that the variables were distinct.... a much easier job.
Of course, using EQUIVALENCE could introduce the same type of aliasing.