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

catastrophic error: ifort not playing nice with block, derived types and subroutines


I'm getting an internal compiler error with the following program

program test_catastrophe
  use runmodes_m, only: RunModeT, RealTime
  implicit none
  class(RunModeT), allocatable :: runmode
  integer :: i

    select type (runmode)
    type is (RealTime)
       call whatever(i)
    end select
  end block
  subroutine whatever(i)
    integer :: i
  end subroutine whatever
end program test_catastrophe

The module contains the following

module runmodes_m

  type, abstract :: RunModeT
  end type RunModeT
  type, extends(RunModeT) :: RealTime
  end type RealTime

end module runmodes_m

When I compile this with ifort 18.0.0 20170811 on CentOS Linux 7.4.1708 I get the following error message

test_catastrophe.f90(10): 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 test_catastrophe.f90 (code 1)

The only flag used for the compiler was -c

0 Kudos
2 Replies
Valued Contributor I

Confirmed, with v17, v18 and v19beta. Ok with gfortran v5 and v9 as well as nagfor 6.2. PGI doesn't know the syntax. 


0 Kudos
Honored Contributor II

You may want to report at the support center: otherwise it's doubtful any Intel staff will pick up on this issue and work toward getting it fixed.

Separately, note there are some coders and now compilers too who get 'tripped up' with dummy arguments in CONTAINed subprograms with the same names as objects in the host.  You may want to avoid this, it can also give you an immediate workaround!

   subroutine whatever(j)
      integer :: j


0 Kudos