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

ICE in select type with class(*)

Wolf_W_
New Contributor I
355 Views

The code below produces an internal compiler error, if the /debug:full option is enabled.

program main
  implicit none

    real :: foo(2,2)
    foo = 1.0

    call testSub(foo)

  contains

  subroutine testSub(matrix)
    class(*), intent(inout) :: matrix(:,:)  ! << This works
!    class(*), intent(inout) :: matrix(2,2)  ! << This fails
    select type(local => matrix)
      type is (real)
    end select
  end subroutine testSub

end program

 

Compiler: Intel(R) Visual Fortran Compiler XE 15.0 Update 2 for Windows

0 Kudos
2 Replies
Steven_L_Intel1
Employee
355 Views

Thanks for the nice example. Escalated as issue DPD200368346. I will update this thread when there is news.

0 Kudos
Steven_L_Intel1
Employee
355 Views

Fixed for a major release later this year.

0 Kudos
Reply