MODULE MOD_RTP INTEGER, PARAMETER :: LINE_LEN = 128 INTEGER, PARAMETER :: WORD_LEN = 100 TYPE, ABSTRACT, PUBLIC :: RTP CHARACTER(LEN=LINE_LEN) :: HELP CHARACTER(LEN=WORD_LEN) :: KEYWORD CHARACTER(LEN=LINE_LEN) :: DESCRIPTION LOGICAL :: SET_BY_USER = .FALSE. INTEGER :: ORDER = 0 END TYPE TYPE, EXTENDS(RTP), PUBLIC :: RTP_REAL REAL :: DEFAULT_VALUE REAL :: VALUE END TYPE END MODULE MOD_RTP subroutine TEST USE MOD_RTP IMPLICIT NONE TYPE(RTP_REAL) :: FUDGE_FACTOR(DEFAULT_VALUE=0.0,KEYWORD='variable_one',DESCRIPTION='the first variable',HELP='gimme the first variable') end subroutine TEST
Fails at compile-time:
$ ifort test1.f90 test1.f90(23): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error. compilation aborted for test1.f90 (code 1)
confirmed in 12.0 Update 5 and the forthcoming Update 6 along with mainline code branch. I'll get a bug report started after seeing if I can trim this down a little more.
oh and I forgot one other note: aside from the internal compiler error, you do realize your syntax is invalid? What you really want is:
TYPE(RTP_REAL) :: FUDGE_FACTOR=RTP_REAL(DEFAULT_VALUE=0.0,KEYWORD='variable_one',& DESCRIPTION='the first variable',HELP='gimme the first variable',VALUE=0.0)
that is, you need to add "=RTP_REAL" and you need an intializer for VALUE, like VALUE=0.0
the compile thought you were declaring an array with some really odd dimensions with the illegal syntax you were using.
Thanks a lot. I actually didn't realise I was doing it wrong. I'd just read about component initialisation and thought I'd give it a try. When I saw the ICE, it distracted me from checking the syntax.
ICE with 12.0.5
test1.f90:
Fails at compile-time: Edit: reproduced with 12.0.5