(j3.2006) LEN type parameter
Bill Long
longb
Mon Dec 18 18:23:52 EST 2017
Interesting test with very inconsistent compiler behavior:
program t03
type badtype (p5)
integer, len :: p5
real (kind=p5) :: x ! X decl line
integer :: y=p5 ! Y decl line
end type badtype
end
Compiler 1: Error for both X and Y lines
Compiler 2: No errors
Compiler 3: Error for Y line only
Compiler 4: (Evidently does not support pdt yet. Every line that includes ?p5? got an error.)
It reduces to whether a LEN type parameter is a constant expression. Does not seem to be reasonable to me that it would be.
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