This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
ICE caused by -O3 and fbounds-check options together
- From: Vivek Rao <vivekrao4 at yahoo dot com>
- To: fortran at gcc dot gnu dot org
- Date: Thu, 12 Oct 2006 14:40:29 -0700 (PDT)
- Subject: ICE caused by -O3 and fbounds-check options together
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=KhS+v+ntSP1MlbWFnvYxuq/UHVplCSalrFzLAGh6DLd+LOIiE1td2S2cfrK2OEkIV03hss2AmwuWu18LqkIRtIHj/TRoVEekmq11rNM1oOfY8+7IhKEYzRlJUI0F5Tl4spK0VPfizc3eb+NdLvjiIEMhPt0L3Nlqh+mYwfDLHIg= ;
The program below causes an ICE if compiled with
-fbounds-check and the -O3 option, but not if -O2 or
-O1 are used instead of -O3.
! gfortran gcc version 4.2.0 20061011 (experimental)
on Windows XP
! compiles with gfortran -c -O3
! compiles with gfortran -c -fbounds-check
! causes ICE with gfortran -c -O3 -fbounds-check
! error message:
! cov_test.f90: In function 'abc':
! cov_test.f90:8: internal compiler error: in
compare_name_with_value, at tree-vrp.c:3561
module abc_mod
implicit none
integer, public, parameter :: dp = kind(1.0d0)
private
public :: abc
contains
pure function abc(xsd) result(res)
real(kind=dp), intent(in) :: xsd(:)
real(kind=dp) :: res(size(xsd),size(xsd))
integer :: i,j,n
n = size(xsd)
do i=1,n
do j=1,n
if (i /= j) then
res(i,j) = 0.0_dp
else
res(i,j) = xsd(i)*xsd(j)
end if
end do
end do
end function abc
end module abc_mod
Vivek Rao