This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Assumed size arrays as actual arguments


I am in the midst of applying all the constraints and restrictions, required by the standard, on assumed size arrays.

One feature of the standard that has me a little flumoxed is:

5.1.2.4.4 Assumed-size array

....snip....

"An assumed size array has no upper bound in its last dimension and therefore has no extent in its last dimension and no shape. An assumed-size array name shall not be written as a whole array reference except as an actual argument in a procedure reference for which the shape is not required or in a reference to the intrinsic function LBOUND."

...........

I understand perfectly what it means but cannot quite get my head around which prodedures to apply the requirement to. At the moment, I have required elemental procedures and array valued intrinsics to not have such a reference in their argument expressions but have excluded all other actual arguments. Other procedure actuals have been left alone on the grounds that there is no way in which the compiler can determine what goes on within the procedure. The resulting gfortran appears to behave in the same way as Lahey and ifort(actually, it does better in picking some manifestly wrong cases.) but that is almost certainly a self satisfying aassertion, in the sense that I am not sure what else applies and so have not tested it! The result breaks nothing but I have this bad feeling that I am missing cases that should be constrained.

Richard, Brooks, or... do you have some advice to offer, please?

Cheers

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]