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

Visious complier bug...

FlyingHermes
New Contributor I
497 Views

Hi,

I've attached a compressed file containing the source code which reproduce a compiler bug. I've done my best to try to isolate the lines of code which trigger the bug.

The bug seems to be linked to the use statement. For example, the following implementation of the DataTmp_Class procedure results in a compiler bug:

[fortran]Module DataTmp_Class
 
  implicit none

  private
 
  public        DataTmp_Type

  Type                          ::      DataTmp_Type
  contains                                           
    procedure   ,private        ::      Set_Var1
    procedure   ,private        ::      Set_Var2
    procedure   ,private        ::      Set_Var3
  End Type

  contains

Subroutine Set_Var1( This, AllData )
  use AllData_Class              ,only:  AllData_Type
  implicit none
  class(DataTmp_Type)  ,intent(inout)  ::      This
  type(AllData_Type)    ,dimension(:)   ,intent(in)     ::      AllData
End Subroutine

Subroutine Set_Var2( This, AllData )
  use AllData_Class              ,only:  AllData_Type
  implicit none
  class(DataTmp_Type)  ,intent(inout)  ::      This
  type(AllData_Type)    ,dimension(:)   ,intent(in)     ::      AllData
End Subroutine

Subroutine Set_Var3( This, AllData )
  use AllData_Class              ,only:  AllData_Type
  implicit none
  class(DataTmp_Type)  ,intent(inout)  ::      This
  type(AllData_Type)    ,dimension(:)   ,intent(in)     ::      AllData
End Subroutine

End Module[/fortran]

whereas this one doesn't:

[fortran]Module DataTmp_Class
 
  use AllData_Class              ,only:  AllData_Type
 
  implicit none

  private
 
  public        DataTmp_Type

  Type                          ::      DataTmp_Type
  contains                                           
    procedure   ,private        ::      Set_Var1
    procedure   ,private        ::      Set_Var2
    procedure   ,private        ::      Set_Var3
  End Type

  contains

Subroutine Set_Var1( This, AllData )
!   use AllData_Class              ,only:  AllData_Type
  implicit none
  class(DataTmp_Type)  ,intent(inout)  ::      This
  type(AllData_Type)    ,dimension(:)   ,intent(in)     ::      AllData
End Subroutine

Subroutine Set_Var2( This, AllData )
!   use AllData_Class              ,only:  AllData_Type
  implicit none
  class(DataTmp_Type)  ,intent(inout)  ::      This
  type(AllData_Type)    ,dimension(:)   ,intent(in)     ::      AllData
End Subroutine

Subroutine Set_Var3( This, AllData )
!   use AllData_Class              ,only:  AllData_Type
  implicit none
  class(DataTmp_Type)  ,intent(inout)  ::      This
  type(AllData_Type)    ,dimension(:)   ,intent(in)     ::      AllData
End Subroutine

End Module[/fortran]

The difference between the two implementation is that AllData_Type type is made accessible through host association to the entire module instead that to each individual procedures.

Note that the initial error message (also related to a compiler bug) was not the one I have now, after having reduced to code to a minimum example. I guess the two bugs are connected but I'm not sure. This initial bug was located in the MainObj_Class file (at least, that what the error message was saying) and it was vanishing if I was removing the AllData structure of type AllData_Type.

I hope I'm clear enougth.

0 Kudos
2 Replies
Steven_L_Intel1
Employee
497 Views

Thanks - I can reproduce the error and will escalate it to the developers. Issue ID is DPD200240402.

0 Kudos
Steven_L_Intel1
Employee
497 Views

This was fixed in update 4 or 5.

0 Kudos
Reply