nncarlson / gfortran.dg

The GFortran testsuite rigged for testing other Fortran compilers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDT type parameter inquiry returns scalar not array in pdt_20.f03

nncarlson opened this issue · comments

The final line of pdt_20.f03

   if (any (x%r%a .ne. 1)) stop 1

expects that the type parameter inquiry x%r%a will return an array because r is an array. I'd guess that the implementation of PDT views type parameters as regular components of the type. This is not correct; they are not components, though the same syntax is used. See Note 6.7 (F08). The type parameter inquiry always returns a scalar, even when applied to an array.

I submitted PR84119; see it for more details.

The NAG compiler reports an error for that line because the argument to ANY is a scalar (correct) and not an array.