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

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

pwl_b
Novice
785 Views

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:[fortran]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[/fortran]

0 Kudos
6 Replies
pwl_b
Novice
785 Views
Calling a constructor with f nullified explicitely works just fine:
[fortran]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
[/fortran]
Anyway, the example in the previous post should work as well.
0 Kudos
Steven_L_Intel1
Employee
785 Views
Thanks - I have reported this as issue DPD200174320. I found another variant that also gets the internal compiler error.
0 Kudos
pwl_b
Novice
785 Views
Can I track the status of the issue somehow?
0 Kudos
Steven_L_Intel1
Employee
785 Views
Subscribe to this thread. I will post updates when I get them. Is this blocking you?
0 Kudos
pwl_b
Novice
785 Views
If weren't for the workaround I would complain more:-). Right now this issue is not critical to me.
0 Kudos
Steven_L_Intel1
Employee
785 Views

This was fixed in the 13.1 compiler.

0 Kudos
Reply