An ICE with gfortran 4.6.1, optimization -O3, not with -O2.
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Aug 23 21:06:00 GMT 2011
On Tue, Aug 23, 2011 at 01:45:21PM -0700, Steve Kargl wrote:
> On Tue, Aug 23, 2011 at 10:17:18PM +0200, Toon Moene wrote:
> > All,
> >
> > The attached preprocessed Fortran source draws an Internal Compiler
>
>
> It's this statement:
>
> xkcoef(npne(jn)+jm)=-zxxx*(zjm**2+zjn**2)**0.5_jprb
>
> in subroutine posnam that is causing the ICE. If one
> uses the good old fashion sqrt(), the code compiles.
>
Here's the reduce test case that Toon meant to send.
module yemdyn
implicit none
integer, parameter :: jpim = selected_int_kind(9)
integer, parameter :: jprb = selected_real_kind(13,300)
real(kind=jprb) :: elx
real(kind=jprb), allocatable :: xkcoef(:)
integer(kind=jpim),allocatable :: ncpln(:), npne(:)
end module yemdyn
subroutine suedyn
use yemdyn
implicit none
integer(kind=jpim) :: jm, jn
real(kind=jprb) :: zjm, zjn, zxxx
jn=0
do jm=0,ncpln(jn)
zjm=real(jm,jprb) / elx
xkcoef(npne(jn)+jm) = - zxxx*(zjm**2)**0.5_jprb
end do
end subroutine suedyn
--
Steve
More information about the Fortran
mailing list