- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Dear Fortran Masters,
The code below is given an internal compiler error (C0000005). It seems valid Fortran 2003 to me. The idea of the code is to know the dimensions of the internal arrays of the "stream" data type when the function Solve is called by data types extending taUoO.
The error is obtained using the XE 2015 Composer Edition (latest update).
Thank you in advance, Javier
module mod_UoOAbstract
implicit none
public :: taUoO, stream
private
type, abstract :: taUoO
integer :: isReady = .false.
contains
procedure(Solve), nopass, deferred :: Solve
end type taUoO
type :: stream(nc)
integer, len :: nc
real(8) :: T
real(8) :: P
real(8) :: nF(nc)
real(8) :: zn(nc)
real(8) :: beta
real(8) :: h
end type stream
! Define calling function prototypes. Concrete subroutines must
! be implemented for the extending types
abstract interface
! Stream type is not visible inside the interface, hence it has to be imported
subroutine Solve(nc, nFeeds, nProds, nExtns, nParms, feeds, prods, extns, parms)
Import stream
integer, intent(in) :: nc
integer, intent(in) :: nFeeds
integer, intent(in) :: nProds
integer, intent(in) :: nExtns
integer, intent(in) :: nParms
type(stream(nc)), intent(inout) :: feeds(nFeeds)
type(stream(nc)), intent(inout) :: prods(nProds)
type(stream(nc)), intent(inout) :: extns(nExtns)
real(8), intent(in) :: parms(nParms)
end subroutine Solve
end interface
end module mod_UoOAbstract
- Marcas:
- Intel® Fortran Compiler
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Just in case (error message)
Compiling with Intel(R) Visual Fortran Compiler XE 15.0.4.221 [IA-32]... mod_UoOAbstract.f90 fortcom: Fatal: There has been an internal compiler error (C0000005). compilation aborted for ...\mod_UoOAbstract.f90 (code 1)
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks - I can reproduce this and will let the developers know. Even if the code was not valid, an internal compiler error is never acceptable. Issue ID is DPD200372386.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Out of curiosity: why do you initialize an integer variable with a logical expression?
integer :: isReady = .false.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks - I can reproduce this and will let the developers know. Even if the code was not valid, an internal compiler error is never acceptable. Issue ID is DPD200372386.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Dear mecej4, good observation. isReady should have been declared as logical not as integer. This is a typo from my side. Still the compiler did not complain!
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Mixing numeric and logical is an extension - not a very nice one, but it goes back decades. If you enabled standards checking it would complain. However, this is not relevant to the compiler error.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
The cited compiler error is still present in XE 15.0.5.280
Compiling with Intel(R) Visual Fortran Compiler XE 15.0.5.280 [IA-32]... mod_UoOAbstract.f90 fortcom: Fatal: There has been an internal compiler error (C0000005).
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Yes, there is no resolution to the internal error yet in the noted Issue ID filed by Steve.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
This bug has now been fixed - I expect the fix to be included in compiler version 17.0.1 (Update 1 to Parallel Studio XE 2017).
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora