>.. I would greatly appreciate bug reports, preferably to gcc Bugzilla with the title prefaced by "PDT" or directly to me. ..
@Paul,
If you wish I can send you a simple initial case directly but I thought it will be useful for readers to know of this as well: here's a quick test I tried of what I think is a standard-conforming program and which works as I expect with Intel Fortran:
--- begin PDT example ---
program p
use, intrinsic :: iso_fortran_env, only : CK => character_kinds
implicit none
type :: pdt_t(k,l)
integer, kind :: k = CK(1)
integer, len :: l
character(kind=k,len=l) :: s
end type
type(pdt_t(l=12)) :: foo
foo%s = "Hello World!"
print *, "foo%s = ", foo%s
print *, "len(foo%s) = ", len(foo%s), "; expected is foo%l = ", foo%l
print *, "foo%k = ", foo%k
stop
end program
--- end example ---
Upon compilation with GNU Fortran (gfortran) 8.0.0 20170909 (experimental), the output with errors is
p.f90:10:22:
character(kind=k,len=l) :: s
1
Error: Constant expression required at (1)
p.f90:15:8:
foo%s = "Hello World!"
1
Error: 's' at (1) is not a member of the 'pdtpdt_t_1' structure
p.f90:16:29:
print *, "foo%s = ", foo%s, "
1
Error: 's' at (1) is not a member of the 'pdtpdt_t_1' structure
p.f90:17:38:
print *, "len(foo%s) = ", len(foo%s), "; expected is foo%l = ", foo%l
1
Error: 's' at (1) is not a member of the 'pdtpdt_t_1' structure
The code compiles with no errors or warnings with Intel Fortran and upon execution, the output is as I expect:
foo%s = Hello World!
len(foo%s) = 12 ; expected is foo%l = 12
foo%k = 1