Calling a constructor of the type containing a pointer to procedure causes an Internal compiler error

Calling a constructor of the type containing a pointer to procedure causes an Internal compiler error

Ritratto di pwl_b

ifort version:12.1.0 20110811I would like to call a constructor in the following example. Is there any way to do it, apart removing the pointer from the type definition, and not causing a compiler error?code:

module class_a type :: a procedure(f_interface), pointer :: f => null() end type a abstract interface subroutine f_interface( arg ) import :: a class(a) :: arg end subroutine f_interface end interface end module class_a program test use class_a type(a) :: aa aa = a() end program test

7 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di pwl_b

Calling a constructor with f nullified explicitely works just fine:

module class_a

  type :: a
     procedure(f_interface), pointer :: f => null()
     real :: a = 0.
  end type a

  abstract interface
     subroutine f_interface( arg )
       import :: a
       class(a) :: arg
     end subroutine f_interface
  end interface

end module class_a

program test

  use class_a

  type(a) :: aa
  aa = a( f = null() )

end program test
Anyway, the example in the previous post should work as well.
Ritratto di Steve Lionel (Intel)

Thanks - I have reported this as issue DPD200174320. I found another variant that also gets the internal compiler error.

Steve
Ritratto di pwl_b

Can I track the status of the issue somehow?

Ritratto di Steve Lionel (Intel)

Subscribe to this thread. I will post updates when I get them. Is this blocking you?

Steve
Ritratto di pwl_b

If weren't for the workaround I would complain more:-). Right now this issue is not critical to me.

Ritratto di Steve Lionel (Intel)

This was fixed in the 13.1 compiler.

Steve

Accedere per lasciare un commento.