Internal compiler error at -O2,-O3 with 14.0.2.144

Internal compiler error at -O2,-O3 with 14.0.2.144

Hello,

the code below fails to compile with ifort 14.0.2.144 at -O2 and -O3 and with the specified checking options, but not with -O0 or -O1 and not with older versions.

module ifort14_ice
  implicit none
contains
  subroutine sub ()
    integer :: nc5
    integer :: len_rep
    integer :: min_rep
    min_rep = 10
    min_rep = 30
    min_rep = 60
    nc5 = min(min_rep, len_rep)
  end subroutine sub
end module ifort14_ice

 

% ifort -check all,noarg_temp_created,nooutput_conversion,nostack -c ifort14_ice.f90 -O2 -V
Intel(R) Fortran Compiler XE for applications running on IA-32, Version 14.0.2.144 Build 20140120
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

 Intel(R) Fortran 14.0-1624
ifort14_ice.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 ifort14_ice.f90 (code 1)

 

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You should also report it to Intel Premier Support to have an incident created for the internal compiler error (ICE).

But also, can you recheck your code, especially lines 8 through 10?  What's their purpose?  And how is len_rep assigned for the statement in line 11 to be evaluated?

You don't have to use Intel Premier Support - here is fine and we'll investigate.

Retired 12/31/2016

It's specifically -check uninit that is the trigger for this error. I have escalated it as issue DPD200253731 - thanks for the small example! You can exclude uninit from the checks if you want the compile to continue.

Retired 12/31/2016

Quote:

Steve Lionel (Intel) wrote:

It's specifically -check uninit that is the trigger for this error. I have escalated it as issue DPD200253731 - thanks for the small example! You can exclude uninit from the checks if you want the compile to continue.

Would initializing and defining len_rep before its use in line 11 be another way to allow the compiler to continue?  This way, -check uninit which is too good an option to exclude, can be retained?

 

Not in this case. But removing the redundant assignments to min_rep does eliminate the error.

Retired 12/31/2016

Quote:

FortranFan wrote:

But also, can you recheck your code, especially lines 8 through 10?  What's their purpose?  And how is len_rep assigned for the statement in line 11 to be evaluated?

Steve correctly guessed that the reproducer was reduced from some larger code.  If you're concerned that len_rep might be uninitialized, you can move its declaration to the module level.  The ICE does not disappear.

Steve's suggestion to use -check nouninit works.  I also have another workaround.

Thanks,
Harald
 

Here's another snippet that leads to a similar crash.  Don't know whether it is related, but here we go:

module my_matrix
  implicit none
  integer, parameter :: wp = kind (1.d0)
contains
  subroutine check (a, y)
    real(wp) ,intent(in)            :: a(:,:)
    real(wp) ,intent(out) ,optional :: y(:,:)
    real(wp)          :: zw(size(a,1),size(a,1))
    integer           :: n, nb, lwork
    integer, external :: ilaenv

    n     = size(a,1)
    nb    = ilaenv( 1, 'DSYTRD', 'U', n, -1, -1, -1 )
    lwork = (nb+2)*n
    if (present(y)) then
      call dgemm ('n','t', n, n, n, 1._wp, zw, n, a, n, 0._wp, &
                  y, size (y,dim=1))
    endif
  end subroutine check
end module my_matrix
% ifort -V -O -check uninit -c my_matrix.f90
Intel(R) Fortran Compiler XE for applications running on IA-32, Version 14.0.2.144 Build 20140120
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

 Intel(R) Fortran 14.0-1624
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 my_matrix.f90 (code 1)

 

It's nice to see that the above ICEs are fixed in

Intel(R) Fortran Compiler XE for applications running on IA-32, Version 15.0.0.090 Build 20140723

Thanks,

Harald

 

Glad to hear it.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today