Bug report: nested constructors for const fail

Nested constructors for parametric expression in Fortran fail.

Operating system is a Manjaro Linux
Compiler used

pgfortran -V

pgfortran 19.10-0 LLVM 64-bit target on x86-64 Linux -tp sandybridge 
PGI Compilers and Tools
Copyright (c) 2019, NVIDIA CORPORATION.  All rights reserved.

A minimal working example is provided with

program mwe
   implicit none
   type :: a_type
      integer :: array(5)
   end type a_type
   type(a_type), parameter :: obj = a_type(&
      & array = [1, 2, 3, 4, 5])
end program mwe

Invoking the PGI compiler results in

pgfortran mwe.f90
PGF90-S-0069-Illegal implied DO expression (mwe.f90: 6)
  0 inform,   0 warnings,   1 severes, 0 fatal for mwe

Expected behaviour is compiling the program.

A work around is to define a separate parametric expression for the array and reuse it in the constructor of the derived type.

Thanks awvwgk. I’ve replicated the issue and filed a problem report (TPR #28451).

-Mat