Why does the Fortran 90 Specification specify (5.2.8) that the TARGET keyword must be used to associate a POINTER to it? Why isn’t every type a valid TARGET?
For example,
INTEGER, POINTER :: px INTEGER, TARGET :: x x = 5 px => x
is valid syntax but
INTEGER, POINTER :: px INTEGER :: x x = 5 px => x
is not valid.
Why must this be?
An item that might be pointed to could be aliased to another item, and the compiler must allow for this. Items without the target attribute should not be aliased and the compiler can make assumptions based on this and therefore produce more efficient code.