This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ICE caused by -O3 and fbounds-check options together


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]