- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
This used to coumple but XE2017 update 2 breaks it. I cannot find a workaround.
Simplest example. The submodule would normally be in a sepeeate file but it makes no difference to the bug:
module A implicit none interface module function getItem(id) integer, intent(in) :: id real, pointer :: getItem end end interface real, target :: items(10) end module submodule(A) A1 implicit none contains module function getItem(id) integer, intent(in) :: id real, pointer :: getItem getItem => items(id) end end submodule
링크가 복사됨
2 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I found a workaround if I make the interface declaration and and implementer use a "result" type of return.
I had re-written most of my functions similar to this already because of similar bugs in earlier compiler handling of submodule functions.
module function getItem(id) result(foo) real, pointer :: foo
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Andrew,
Thank you for the report, I will escalate this to our Fortran Engineering team. There shouldn't be an error.
Regards,
