Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29299 Discussions

Visual Fortran Compiler XE 12.0.1.127 internal compiler error (C0000005) for operator(==)

Jim_Vickroy
Beginner
1,223 Views

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]

0 Kudos
12 Replies
Steven_L_Intel1
Employee
1,223 Views
An internal compiler error is, pretty much, always a compiler bug. It may be triggered by a source error, but not necessarily. I'll take a look at your example and see what I find. Thanks for letting us know.
0 Kudos
Steven_L_Intel1
Employee
1,223 Views
I don't see that you have done anything wrong. I have escalated this as issue DPD200164378 and will reply here as I get more information.
0 Kudos
Jim_Vickroy
Beginner
1,223 Views

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.

0 Kudos
Steven_L_Intel1
Employee
1,223 Views
A workaround is to remove the "private" statement.
0 Kudos
Jim_Vickroy
Beginner
1,223 Views

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

0 Kudos
Steven_L_Intel1
Employee
1,223 Views
Ok, glad you got it to work, and we apologize for the inconvenience. We'll fix this as soon as we can.
0 Kudos
Jim_Vickroy
Beginner
1,223 Views

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

0 Kudos
Steven_L_Intel1
Employee
1,223 Views
I'm out of the office this week but will check on Monday.

Please supply a test program for the PRIVATE problem.
0 Kudos
Steven_L_Intel1
Employee
1,223 Views
The problem reported in the original post has been fixed in the compiler sources. It has not yet been put on the list for an update but I expect that to happen soon. I will reply here when more information is available.
0 Kudos
Steven_L_Intel1
Employee
1,223 Views
I expect this fix to appear in Update 3.
0 Kudos
Jim_Vickroy
Beginner
1,223 Views
Thanks for the information. Presumably, I'll recieve a final notification when "Update 3" is avaialble.
0 Kudos
Steven_L_Intel1
Employee
1,223 Views
If you have registered your license, you'll automatically get an email when new updates are available.
0 Kudos
Reply