- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Attempting to compile the following code:
[bash]module A_component
implicit none
private
type, public :: A_Type
contains
procedure :: same_as
generic :: operator(==) => same_as
end type A_Type
contains
pure function same_as(self, other) result(yes)
class(A_Type), intent(in) :: self, other
logical :: yes
yes = .true.
end function same_as
end module A_component
module B_component
use A_component
implicit none
private
type, public, extends(A_Type) :: B_Type
end type B_Type
end module B_component
program Test
! use A_component
use B_component
implicit none
! type(A_Type) :: this ! compiles with no errors
type(B_Type) :: this ! fortcom: Fatal: There has been an internal compiler error (C0000005).
end program Test
[/bash] produces the following output:[bash]Compiling with Intel Visual Fortran Compiler XE 12.0.1.127 [IA-32]... ifort /nologo /debug:full /Od /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc90.pdb" /traceback /check:bounds /libs:static /threads /dbglibs /c /extfor:f03 /free /Qvc9 /Qlocation,link,"c:\Program Files\Microsoft Visual Studio 9.0\VC\\bin" "C:\Documents and Settings\jim.vickroy\My Documents\Visual Studio 2008\Projects\Learning Fortran 2003\Learning Fortran 2003\tester.f03" fortcom: Fatal: There has been an internal compiler error (C0000005). compilation aborted for C:\Documents and Settings\jim.vickroy\My Documents\Visual Studio 2008\Projects\Learning Fortran 2003\Learning Fortran 2003\tester.f03 (code 1)
I would appreciate help understanding what my error is.
Thanks,
-- jv
[/bash]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks much for the quick response!
I guess I should seriously consider a work-around implementation since this issue may take some time to resolve. I'm a Fortran novice so I assumed I was making some obvious mistake.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks much for this work-around ! I really appreciate the prompt response !
I was, unfortunately, using private to allow name reuse so some (additional) refactoring was required in addition to re-enabling the troublesome code.
Fortran makes one really work to use its OO capabilities !
-- jv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any estimate on when a fix would be released?
Unit testing revealed an additional problem with not being able to use the private statement.
It may not be feasible to use the Fortran 2003 OOP features in my work with this version of the compiler.
Thanks,
-- jv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please supply a test program for the PRIVATE problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page