Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

internal compiler errors (derived type bindings)

Ferdinand_T_
New Contributor II
192 Views

Dear all,

I am posting two situations that rise internal compiler errors in the hope that it helps others to avoid lengthy and annoining searches for the cause of the compiler crash, and in case Intel engineers are interested.
Both errors are triggered by invalid uses of type-bound procedures, such as forgetting the parentheses in a function call.

source A:

module m
    ! derived type ----------
    type :: X
        integer :: x_comp
    contains 
        procedure, nopass :: x_bind
    end type
contains
    subroutine x_bind()
    end subroutine

    ! trigger crash ---------
    subroutine CRASH()
        type(X) :: myX

        ! use binding name as keyword
        myX = X(x_bind=1.0d0)
    end subroutine
end module

! compiler output -----------
! test9.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** 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 test9.f90 (code 1)

Source B:

module m
    ! derived type ----------
    type :: X
    contains 
        procedure, nopass :: x_bind
    end type
contains
    subroutine x_bind
    end subroutine

    ! trigger crash ---------
    subroutine crash()
        type(X) :: myX
        logical :: expr

        ! apply any logical operator to non-existing
        ! component that corresponds to a binding name
        expr = .not. myX%x_bind
    end subroutine
end module

! compiler output -----------
! test10.f90(18): 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 test10.f90 (code 1)

System Info:

  • Product Version: Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.3.199 Build 20190206
  • Host OS and Version: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic

Kind regards
Ferdinand

 

0 Kudos
4 Replies
Juergen_R_R
Valued Contributor I
192 Views

Yes, confirmed. Please report this ICE with the Online Support Center.

Ferdinand_T_
New Contributor II
192 Views

Unfortunately without priority support, most of my recent bug-reports (aka support requests) were closed and I was given directions to this forum, hence I reposted here.

Juergen_R_R
Valued Contributor I
192 Views

Reported as issue 04325196.

Note that both code snippets are invalid Fortran. Nevertheless, thet should not ICE, but the code should be rejected. For the first one, the argument of the structure constructor needs to be x_comp=1.0d0, but not x_bind. Ifort hiccups by the wrong name x_bind to an existing TBP subroutine.

For the second, x_bind must be a logical function, not a subroutine, and parentheses are missing. Then ifort compiles the code. Again, it must not ICE, but reject your code.

Ferdinand_T_
New Contributor II
192 Views

Thank you Juergen

Reply