Internal compiler error (C0000005)

Internal compiler error (C0000005)

I have just upgraded Fortran Compiler to 2013 SP1 and my project is not compiled anymore. However, I believe the code is correct. 

module TimeMod
 implicit none
 private
 type, public :: TimeType
 private
 character(len=1) :: dummyChar
 contains
 procedure, private, nopass :: GetDateTime => GetDateTime
 end type TimeType
contains
 function GetDateTime() result(dateTimeString)
 character(len=19) :: dateTimeString
 dateTimeString = ''
 end function GetDateTime
end module TimeMod
module AMod
 implicit none
 private
 type, public, abstract :: AInterface
 private
 character(len=1) :: dummyChar
 end type AInterface
end module AMod
module BMod
 implicit none
 private
 type, public :: BType
 contains
 procedure :: ComputeSomething => ComputeSomething
 end type BType
contains
 function ComputeSomething(this, time) result(something)
 use TimeMod
 class(BType), intent(in) :: this
 type(TimeType), intent(inout) :: time
 real*8 :: something
 something = 0.0d0
 end function ComputeSomething
end module BMod
module CMod
 use AMod
 use TimeMod
 use BMod
 implicit none
 private
 type, public :: CType
 private
 type(BType) :: b
 class(AInterface), allocatable :: a
 contains
 procedure :: DoSomething
 end type CType
contains
 subroutine DoSomething(this, id, time)
 class(CType), intent(inout) :: this
 integer, intent(in) :: id
 type(TimeType), intent(inout) :: time
 print *, 'ok'
 end subroutine DoSomething
end module CMod
module DMod
 use CMod
 use TimeMod
 implicit none
 private
interface
 subroutine DoIt(ptr, id, time)
 use CMod
 use TimeMod
 type(CType), pointer, intent(in) :: ptr
 integer, intent(in) :: id
 type(TimeType), intent(inout) :: time
 end subroutine DoIt
 end interface
 type, public :: DType
 private
 type(CType) :: array(20)
 contains 
 procedure :: DoSomething => DoSomething
 procedure :: DoForAll => DoForAll
 end type DType
contains
subroutine DoSomething(this, id, time)
 class(DType), intent(inout) :: this
 integer, intent(in) :: id
 type(TimeType), intent(inout) :: time
 call this%array(1)%DoSomething(id, time)
 end subroutine DoSomething
 subroutine DoForAll(this, method, time)
 class(DType), target, intent(in) :: this
 procedure(DoIt) :: method
 type(TimeType), intent(inout) :: time
 type(CType), pointer :: ptr
ptr => this%array(1)
 call method(ptr, 1, time)
end subroutine DoForAll
end module DMod
program DELME
 use DMod
 use TimeMod
 type(DType) :: d
 type(TimeType) :: t
 call d%DoSomething(1, t)
end program DELME

13 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Thanks - I have escalated this as issue DPD200249466 and will let you know of any progress. The statement that triggers the error is:

call this%array(1)%DoSomething(id, time)

Steve - Intel Developer Support

Looks like access violation error.

Citation :

Steve Lionel (Intel) a écrit :

Thanks - I have escalated this as issue DPD200249466 and will let you know of any progress. The statement that triggers the error is:

call this%array(1)%DoSomething(id, time)

 

Hi Steve,

Any information on when it will be fixed?

It's still being worked on. I don't have an estimate at present.

Steve - Intel Developer Support

The developers have fixed this, but the fix missed the deadline for update 2. I expect it to make update 3.

Steve - Intel Developer Support

hey i;m using mocrosift developer studio fortran 90 for my final project code and i encountered  the same error:

unhandled execption in "hydroplainchannel.exe"(HYDROP~1.exe):

0×C0000005:Access Violation.

why this error occurs and what should i do to solve this error

tnx in advance

 

Citation :

nariman k. a écrit :

hey i;m using mocrosift developer studio fortran 90 for my final project code and i encountered  the same error:

unhandled execption in "hydroplainchannel.exe"(HYDROP~1.exe):

0×C0000005:Access Violation.

why this error occurs and what should i do to solve this error

tnx in advance

 

 

Apart from actual logic errors the usual problems causing Access Violations are :

Uninitialized variables, subscript out of range, mismatched arguments.

As a start you should recompile your code with all of the compile time and runtime error checking options on. (e.g. /check:all)

Also look at the "traceback" option which helps identifying where an error occurs.

Les

There hasn't been much discussion lately about how to use the Microsoft Fortran of 17 years ago. Its deficiencies might be compounded, if anything, by running on versions of Windows which weren't in the planning stage when that project was abandoned.  If you aren't prepared to guess whether the problem lies in your own program, in the compiler, or in attempting to use the compiler on a more recent Windows, speculation on our part isn't likely to help.

Nariman K: There is a major difference between the topic of this thread and the topic of your post. Marat S. reported an access violation by the Intel compiler in the course of compiling his Fortran source code. Your problem is with your own EXE (which was compiled using a really old and known-to-be-buggy compiler) causing an access violation. Marat S.'s problem requires fixing bugs in the compiler. Your problem requires fixing bugs in the sources used to build hydroplainchannel.exe, and it serves no useful purpose to confuse the two issues.

@Nariman

Regarding your question related to access violation error culprits I would like to add also as root cause of this error issues like: referencing unmapped dll's, dereferencing pointers which hold the address of uninitialized variables,improperly cleaned stack when some junk is referenced.In order to investigate that issue you can inspect minidump files.

 

 

Tim Prince, mecej4:

Citation :

nariman k. wrote:

hey i;m using mocrosift developer studio fortran 90...

Do you have more information than posted on this forum post?  Otherwise, how do you conclude from this that he is using "Microsoft Fortran of 17 years ago" or ".. was compiled using a really old and known-to-be-buggy compiler"?

Did "Microsoft Fortran" ever include support for Fortran 90?

Isn't "developer studio" used interchangeably with Microsoft Visual Studio versions as recent as Visual Studio 2013?

Yes, Microsoft Fortran PowerStation, used in Developer Studio 4, was a Fortran 90 compiler.

Steve - Intel Developer Support

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui