- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed for a future release - sorry, no workaround at this time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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