- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hello,
I am trying to understand how finalizers work in Fortran.
I have written a minimal test program containing a derived type with just a final procedure and an allocatable component.
It appears that the finalizer is called more that once, and I don't understand why.
I noticed this behaviour only if the derived type contains an allocatable component, and if more than one object is instantiated from that class.
Here is the code :
module finalizer_module implicit none type :: obj real,allocatable :: var contains final :: clean end type contains subroutine clean(this) type(obj) :: this write(*,*) "in finalizer" end subroutine clean end module finalizer_module ! program test_finalizer use :: finalizer_module call sub contains subroutine sub type(obj) :: f1,f2 end subroutine sub end program test_finalizer
And here the output :
in finalizer in finalizer in finalizer
I think I should have only two "in finalizer", as I have two objects (f1,f2) that are destroyed at "end subroutine sub"?
NB:
$ ifort --version ifort (IFORT) 14.0.2 20140120
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
At first glance this appears to be ether the same bug or a related one to the one reported in http://software.intel.com/en-us/forums/topic/487145 ; For now I'm going to assume it's the same but will add your test case to it - issue ID is DPD200249474.
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
At first glance this appears to be ether the same bug or a related one to the one reported in http://software.intel.com/en-us/forums/topic/487145 ; For now I'm going to assume it's the same but will add your test case to it - issue ID is DPD200249474.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Ok, I hadn't found this previous thread...
Is there a public website available to follow the evolution of ifort issues ?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Simon wrote:
Ok, I hadn't found this previous thread...
Is there a public website available to follow the evolution of ifort issues ?
Yes, it'll be nice if such a site were available..
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
This is the site. Any developments are added to the forum threads where the issue was reported.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Steve,
What I think would be helpful would be to have a Sticky thread listing the Issue ID's, summary, status, what version fixed issue, and links back to the forum messages that relate to the issue. This would be immensely useful as a self-help tool.
Jim Dempsey
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Jim, the "summary" is perhaps the hardest part of that. I know from my many years of writing release notes that it is sometimes difficult if not impossible to come up with a concise summary of a particular problem. (Especially when the symptom is Internal Compiler Error.) Even if one could write a summary, it can mislead people into thinking they have the same problem and they won't report it. We'd much rather you report a duplicate than decide you don't need to report a problem. Often new reports of what looks like the identical problem are in fact something else entirely.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Steve,
Perhaps you and Intel staff can look at this site which lists all the open issues with gfortran. Something similar for Intel Fortran will be very helpful. As Jim suggests, one good add would be links to any forum topics that connect to the issues.
Thanks,
