Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

Internal compiler error with ifx

Juergen_R_R
Valued Contributor II
998 Views

Using ifx --version
ifx (IFX) 2023.1.0 20230320

the following code leads to an ICE upon compilation,

module m
  implicit none
  private
  type :: parameter_t
     private
     class(data_t), pointer :: data => null ()
  end type parameter_t

  type, abstract :: data_t
     private
   contains
     procedure :: get_real_ptr => data_get_real_ptr
  end type data_t

  type, extends (data_t) :: real_t
     private
     real :: value
  end type real_t

  type, extends (data_t) :: complex_t
     private
     complex :: value
  end type complex_t
  
  type :: t1_t
     private
     type(parameter_t), dimension(:), allocatable :: par
     type(real_t), dimension(:), pointer :: par_real => null ()
     type(complex_t), dimension(:), pointer :: par_complex => null ()
   contains
     procedure :: set => t1_set
     procedure :: get_par_real_ptr => t1_get_par_real_ptr_index
  end type t1_t

  interface
    module function data_get_real_ptr (par) result (ptr)
      class(data_t), intent(in), target :: par
      real, pointer :: ptr
    end function data_get_real_ptr
    module function t1_get_par_real_ptr_index (t1, i) result (ptr)
      class(t1_t), intent(inout) :: t1
      integer, intent(in) :: i
      class(data_t), pointer :: ptr
    end function t1_get_par_real_ptr_index
  end interface  
contains

  subroutine t1_set (t1, i, value)
    class(t1_t), intent(inout), target :: t1
    integer, intent(in) :: i
    real, intent(in) :: value
    class(data_t), pointer :: par_data
    real, pointer :: value_ptr
    par_data => t1%get_par_real_ptr (i)
    !!! triggers the ICE
    value_ptr => par_data%get_real_ptr ()
  end subroutine t1_set

end module m
1 Solution
Barbara_P_Intel
Employee
953 Views

Thank you for reporting this. I just tried your reproducer with the compiler that will be available in mid-2023. The ICE is gone!

I'll let you know when it's available.


View solution in original post

0 Kudos
2 Replies
Barbara_P_Intel
Employee
954 Views

Thank you for reporting this. I just tried your reproducer with the compiler that will be available in mid-2023. The ICE is gone!

I'll let you know when it's available.


0 Kudos
Barbara_P_Intel
Employee
844 Views

I just successfully compiled the code that previously ICEd with the ifx version that will be available in a few weeks. The compiler is part of oneAPI HPC Toolkit 2023.2.



0 Kudos
Reply