Showing results for 
Search instead for 
Did you mean: 
New Contributor I

ICE: Error for submodule with functions using format "Module Procedure" -> "End Procedure"

Hi, the following code produces an ICE.

Module MyModule
  implicit none
  Type ,public  ::  MyType
    integer     ::  N = 2
    procedure   ::  DoSomething
  End Type
    Pure Module Function DoSomething( This, Inp ) result(Out)
      class(MyType)               ,intent(in) :: This
      integer ,dimension(This%N)  ,intent(in) :: Inp
      integer ,dimension(This%N)              :: Out
    End Function
  End Interface
End Module

Submodule(MyModule) MySubModule
  implicit none
! !   WORKS
!     Pure Module Function DoSomething( This, Inp ) result(Out)
!       class(MyType)               ,intent(in) :: This
!       integer ,dimension(This%N)  ,intent(in) :: Inp
!       integer ,dimension(This%N)              :: Out
!       Out = Inp * This%N
!     End Function
    Module Procedure DoSomething
      Out = Inp * This%N
    End Procedure
End Submodule

Program Main
  use MyModule ,only: MyType
  type(MyType)  :: Obj
  write(*,* ) Obj%DoSomething([1,2])
End Program

using ifort version 17.0.4.

The error comes from the "Module Procedure" ... "End Procedure" form for declaring submodule procedures.

If The procedure interface is repeated, then the error goes away.

I thought initially that this error was related to issue DPD200413234.



0 Kudos
5 Replies
Valued Contributor III

It's unfortunate but the

It's unfortunate but the problem is present in Intel Fortran compiler 18 Beta as well.


If you follow other threads, you may have noticed Intel now expects you to submit an incident for issues of interest to you at the Intel Online Service Center (OSC):

The forum can help with discussions and so forth.  But note reporting an ICE on the forum may no longer lead to a tracking incident with the development.

If you're keen on someone from Intel to look at this ICE, your best bet will be to submit it at the OSC.

0 Kudos
New Contributor I

Thanks FortranFan.

Thanks FortranFan.

The ICE has been reported on Intel OSC.

I indeed wasn't sure if this forum was still the good place for reporting such issue.


0 Kudos
New Contributor III

Thanks FlyingHermes for the

Thanks FlyingHermes for the report. I appreciate it very much to have 'issues' reported here in the forum too because at the moment, we customers have no other possibility to see, if issues are already filed or not. This knowledge helps me, not to spend more time than necessary to file an issue on OSC or to think on workarounds. Hopefully there's time enough for the Intel team to fix it for PSXE 18 release. Good luck, Johannes

0 Kudos
Black Belt

Just keep in mind that it's

Just keep in mind that it's often not possible to know if you have the exact same issue for an ICE and if you encounter an ICE your first step should be to report it to Intel. Simply posting in the forum and hoping it will be picked up, or worse, seeing another thread that you think is the same problem and waiting for the fix, is counterproductive.

Steve (aka "Doctor Fortran") -
0 Kudos

Quote:FlyingHermes wrote:

FlyingHermes wrote:


The ICE has been reported on Intel OSC.

Thank you for reporting the bug on OSC. Unfortunately, there is not enough time to fix it for 18.0 initial release. However, the fix will be included in future releases.


Devorah - Intel® Developer Support
0 Kudos