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

Intel Visual Fortran 16: internal compiler error with recursive procedures

Terry_G_
Beginner
173 Views

Cut-down code to reproduce problem:

module mod_procs
   type, public :: type_box
      integer, public :: m  
   contains
      procedure :: suba 
   end type type_box
  
   interface
      module subroutine suba(this,n)
         class(type_box) :: this
         integer :: n
      end subroutine suba
   end interface

end module mod_procs

submodule(mod_procs) mod_procs_suba

   implicit none

contains

   module procedure suba   !(n)
      write(*,*) this%m, n
      this%m = this%m + 1
      call minus_1
      call plus_1
   return
   
   entry minus_1
      write(*,*) n-1
   return
 
   entry plus_1
      write(*,*) n+1
   return
   
   end procedure suba
   
end submodule mod_procs_suba

program P1

   use mod_procs
   
   implicit none

   type(type_box) :: box
   
   box%m = 9
   
   call box%suba(3)
   
   print *, 'Hello World'

end program P1

 

>>fortcom: Fatal: There has been an internal compiler error (C0000005).

0 Kudos
2 Replies
Steve_Lionel
Black Belt Retired Employee
173 Views

Fails in 17.0.2 as well.

Kevin_D_Intel
Employee
173 Views

And our 18.0 Beta also. I'll report this to Development shortly. Thank you for the nice test case.

(Internal tracking id: CMPLRS-42622)

Reply