Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner

Intel Visual Fortran 16: internal compiler error with recursive procedures

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
Highlighted
Black Belt

Fails in 17.0.2 as well.

Fails in 17.0.2 as well.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Employee

And our 18.0 Beta also. I'll

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)

0 Kudos