(j3.2006) associate name

Bill Long longb
Fri Apr 28 12:05:04 EDT 2017


Consider

real,pointer :: x(:)

associate (assoc_name => x)
  print *, lbound(assoc_name), ubound(assoc_name)
end associate

end

The rules for LBOUND and UBOUND require that the argument be associated if it is a pointer.  But the assoc_name is not a pointer according to the f2015 text. It?s just a variable with the TARGET attribute.  And it is a rank-1 array.  But, clearly, does not have sensible bounds defined.   Is this a case we missed, or is there some other rule I?m no seeing that prohibits these lbound and ubound references?

Cheers,
Bill

Bill Long                                                                       longb at cray.com
Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
Bioinformatics Software Development                      fax:  651-605-9143
Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425





More information about the J3 mailing list