https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122165

            Bug ID: 122165
           Summary: [PDT] gfortran does catch F2023:R916
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kargls at comcast dot net
  Target Milestone: ---

Hi Paul,

This appeared on the J3 mailing list.  From Malcohm reply
I suspect NAG catches the issue.  All other compilers seem
to compile and execute the code.  In the code below, 'k'
is not designator (see R901, type-param-name is not listed).

! F2023:R916 type-param-inquiry is designator%type-param-name
program foo
   implicit none
   type dt(k)
      integer(8), len :: k = 1
      character(k) :: arr
   end type
   type(dt(:)), allocatable  :: d1
   if (d1%k%kind /= 8) stop 1      ! Should issue error
end

I looked in primary.cc(gfc_match_varspec) for a place to 
try to catch this, but came up empty.

Reply via email to