Consider the following small program:
PROGRAM TEST
IMPLICIT NONE
REAL, DIMENSION(:), POINTER :: a, b
ALLOCATE (a(1:0))
b => a
WRITE (*, *) ASSOCIATED(a,b)
END PROGRAM TEST
I have tested the program on three compilers. Two of them gave the result F
and one of them the result T.
After a quick glance through the standard I did not find anything to
support the "F" case although I can be wrong...
After all, Fortran DOES support zero-sized objects and they DO exist and
ARE defined and
"a" and "b" DO point to the same target, or?
Agree or disagree?
Lars Mossberg
University of Trollhattan / Uddevalla and
Volvo IT / Aerospace Support Unit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|