Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29230 Discussions

Visual Studio IDE issue: blank members drop-down for a module with parameterized derived type and a type with a bound procedure.

FortranFan
Honored Contributor III
603 Views

With Visual Studio 2013 and Intel Fortran integration using compiler 2015, update 2, the members drop-down for the source window in the IDE shows up empty for the simple module code shown below.  Hopefully the problem is reproducible and it can be directed for a resolution.

module m

   implicit none

   type :: t(n)

      integer, len :: n
      real :: x(n)

   end type

   type, public :: foo
      private
      real, allocatable :: m_x(:)
      type(t(:)), allocatable :: m_t
   contains
      private
      procedure, pass(this), public :: init
   end type foo

contains

   pure subroutine init(this, x, irc)

      !.. Argument list
      class(foo), intent(inout) :: this
      real, intent(in)          :: x(:)
      integer, intent(inout)    :: irc

      !.. Local variables
      integer :: size_x

      !..
      irc = 0
      size_x = size(x)

      if (size_x > 0) then
         allocate( t(size_x) :: this%m_t, stat=irc )
         if (irc /= 0) return
         this%m_t%x = sqrt(x)
         this%m_x = x
      else
         irc = 1
      end if
      !..
      return

   end subroutine init

end module m

Thanks, 

0 Kudos
4 Replies
FortranFan
Honored Contributor III
603 Views

Here' a screen image of the source window in the IDE that shows the empty list:

vs.png

0 Kudos
Steven_L_Intel1
Employee
603 Views

Thanks - I've seen issues like this before and will let the developers know.

0 Kudos
FortranFan
Honored Contributor III
603 Views

Steve Lionel (Intel) wrote:

Thanks - I've seen issues like this before and will let the developers know.

FWIW, line 13 (where a PDT is a component of a derived type) seems to be the issue; commenting that line out immediately adds init to the members drop-down list.

0 Kudos
Steven_L_Intel1
Employee
603 Views

Escalated as issue DPD200366573.

0 Kudos
Reply