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

Segfault with final method

pwl_b
Novato
1.123 Visualizações

Hi, I have detected, what I believe, is a bug in ifort (13.0.0 20120731). The following code produces a segfault for no reason known to me.

module mod_b

  type :: b
   contains
     final :: finalize
  end type b

contains

  subroutine finalize(self)
    type(b) :: self
  end subroutine finalize

end module mod_b

module mod_t

  use mod_b

  type :: tt
   contains
     procedure :: get
  end type tt

contains

  subroutine get( self, box)
    class(tt), target :: self
    type(b), pointer, intent(out), optional :: box
    if( present(box) ) nullify(box)
  end subroutine get

end module mod_t


program d1

  use mod_t
  type(tt) :: t
  call t%get()

end program d1

When any of the options "pointer, intent(out), optional" are altered or removed the segfault disappears.

Regards,

Paweł Biernat.

0 Kudos
1 Solução
Anonymous66
Contribuidor valorado I
1.123 Visualizações
Hello Pawel, Thank you for reporting this problem. I have escalated this issue to the developers. The issue number is DPD200236504. I will post any updates I receive to this thread. Regards, Annalee Intel Developer Support

Ver solução na publicação original

3 Respostas
Anonymous66
Contribuidor valorado I
1.124 Visualizações
Hello Pawel, Thank you for reporting this problem. I have escalated this issue to the developers. The issue number is DPD200236504. I will post any updates I receive to this thread. Regards, Annalee Intel Developer Support
Anonymous66
Contribuidor valorado I
1.123 Visualizações
Hello Pawel, A fix has been found for this issue. We are planning to include it in an update which is currently planned for mid-January. Regards, Annalee
Anonymous66
Contribuidor valorado I
1.123 Visualizações

Hello Pawel,

This is issue has been fixed in Intel® Fortran Composer XE for Linux* 2013 Update 3 which is now available at the Intel® Registration Center.

Annalee

Responder