Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor II
46 Views

internal compiler errors (derived type bindings)

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
Highlighted
Valued Contributor I
46 Views

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

0 Kudos
Highlighted
New Contributor II
46 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.

0 Kudos
Highlighted
Valued Contributor I
46 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.

0 Kudos
Highlighted
New Contributor II
46 Views

Thank you Juergen

0 Kudos