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

Internal compiler error

Ulrich_M_
New Contributor I
919 Views

The following code leads to an internal compiler error with Intel(R) Visual Fortran Compiler 19.1.3.311 [Intel(R) 64]

program test
	implicit none
	integer, parameter :: n=10
	real	:: x(n)
	integer :: inds(n),i
	
	inds=[(i,i=1,10)]
	x=0
	x(inds(nint(.15*n):))=x(inds(nint(.15*n):))+1
end program test

 

0 Kudos
3 Replies
mecej4
Honored Contributor III
899 Views

The ICE also occurs with 2021.3.0 on Windows (ifort as well as ifx). Here is a work around:

i = nint(.15*n)
x(inds(i:))=x(inds(i:))+1
0 Kudos
Barbara_P_Intel
Employee
866 Views

@Ulrich_M_  Thanks for reporting this ICE.

@mecej4  Thanks for the workaround!

I filed a bug report, CMPLRIL0-34036, against both ifort and ifx. I'll let you know its progress to a fix.

 

0 Kudos
Barbara_P_Intel
Employee
687 Views

I just checked this issue with the latest ifort release 2021.6.0. The ICE you reported is gone.

This version of ifort is part of oneAPI 2022.2 that was recently released.



0 Kudos
Reply