- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The finalization of a non-present optional intent(out) allocatable dummy argument produces a segmentation fault at runtime when the following code is compiled with ifort 16.0.3. This is the same issue as reported some years ago in https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/494928 (topic closed) and faintly ressembles https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/327918 (pointer instead of allocatabe).
module m ! finalized t type :: t contains final :: tfinal end type contains subroutine tfinal(a) type(t), intent(inout) :: a end subroutine ! pass optional t, finalized on entry subroutine pass(a) type(t), allocatable, intent(out), optional :: a print *, 'passed' end subroutine end module program p use m type(t), allocatable :: a call pass(a) ! ok call pass() ! segfault end programIt would certainly be nice to have a fix for this, or some ideas for workarounds without having to change the dummy's attributes. Kind regards Ferdinand PS: Syntax-highlighting as suggested using (left-angle bracket) pre class="brush:fortran" (right-angle bracket) doesn't work in my post.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this problem. I have opened a bug report for it. The report ID is DPD200414190.
Thanks,
Xiaoping Duan
Intel Customer Support
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page