Submodule matching error of declaration

Next bug, again with submodules. This one appears to be a related to the use of the optional and target attributes for an allocatable intent(out) array for a derived type.

The following code results in a compile error:

module tecplotIOMod
  implicit none

  type tecZoneType
     integer :: type
  end type tecZoneType

  interface
     module subroutine readTecFE(outZones)
       type(tecZoneType), dimension(:), allocatable, intent(out), optional, target :: outZones
     end subroutine readTecFE
  end interface
end module tecplotIOMod

submodule(tecplotIOMod) tecplotIOSubMod
  implicit none
contains
  module subroutine readTecFE(outZones)
    type(tecZoneType), dimension(:), allocatable, intent(out), optional, target :: outZones
  end subroutine readTecFE
end submodule tecplotIOSubMod

program main
  use tecplotIOMod
  print *,'Hello World'
end program main

The definition of outZones is exactly the same between the module and submodule definitions, but I still get the compile error:

NVFORTRAN-S-1058-The type of definition argument outzones does not match its declaration type (main.F90: 18)
  0 inform,   0 warnings,   1 severes, 0 fatal for readtecfe

It will compile if remove target attribute. I was able to refactor the code remove the need for target attribute.

Thanks,
Gaetan

Thanks Gaetan. I added a new report , TPR #31660.