Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compile problem with nested type

Bob_G_
Beginner
389 Views

Here is the code in Test.f90

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

module type_definitions
type AA
integer :: idn
type(BB),pointer :: n
end type AA

type BB
integer :: id
type(AA),pointer :: m
end type BB

end module type_definitions

subroutine findx(kk)
use type_definitions
implicit none
type(AA) :: kk
end subroutine findx

program main
use type_definitions
implicit none
character*18 ar,md
open(1,file='../../../Data/Model.dat')
read(1,'(a18)')ar
read(1,'(a18)')md
close(1)
end program main

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

There is a type AA defined in type BB, and also the type BB exist in type AA,  problem occers with "fortcom: Fatal: There has been an internal compiler error (C0000005)" under VS2008+IFV11.1.038. I am really confused as I compiled it in IFV prompt with "ifort -o test test.f90", it works well.  This is a simply section from a robust scientific package, and I prefer debugging it step by step in VS2008, so what is the problem bewteen the different methods? Thanks for any comments in advance.

0 Kudos
2 Replies
Andrew_Smith
Valued Contributor I
388 Views

It compiles under VS2010 and XE 13.1.0.149.

Try turning off the diagnostics "Check routine interfaces"

0 Kudos
Bob_G_
Beginner
388 Views

Right, that's the point. Thanks a lot. The problem is fixed.

0 Kudos
Reply