- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I am getting the message
fortcom: Fatal: There has been an internal compiler error (C0000005).
when I compile some code containing procedure pointers to functions returning class() pointers. I am using IVF Compiler XE 12.0.1.127, IA-32. Here is a code snippet that produces the behaviour:
[fortran]module polytest
type base
integer(4)::d
end type base
interface
pure function ptr_func()
import base
class(base),pointer::ptr_func
end function
end interface
procedure(ptr_func),pointer::p
contains
pure function get_ptr()
class(base),pointer::get_ptr
allocate(get_ptr)
end function get_ptr
subroutine test()
p => get_ptr
end subroutine test
end module polytest[/fortran] If I comment out the line p=>get_ptr, it compiles fine. I can fix the problem by using type() pointers instead of class() pointers, but I need polymorphism. Any advice on how to proceed?
コピーされたリンク
3 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks - I can reproduce the problem and will forward it to development. Issue ID is DPD200171895. If I can find a workaround I will let you know.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
This has been fixed for a future release - sorry, no workaround at this time.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks. I'm happy with tweaking the compilation of the single relevant source file to get it to work. It does not affect the rest of the program.