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
Novice
797 Views

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 Solution
Anonymous66
Valued Contributor I
797 Views
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

View solution in original post

0 Kudos
3 Replies
Anonymous66
Valued Contributor I
798 Views
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
0 Kudos
Anonymous66
Valued Contributor I
797 Views
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
0 Kudos
Anonymous66
Valued Contributor I
797 Views

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

0 Kudos
Reply