This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/17502] New: ICE: segmentation fault on (believed) correct code
- From: "pdellar at na-net dot ornl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2004 16:08:28 -0000
- Subject: [Bug fortran/17502] New: ICE: segmentation fault on (believed) correct code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
g77 -c -O0 -ffixed-line-length-none -fno-second-underscore -fschedule-insns2
on the following (believed correct, or at least working with 3.4.1) code causes
an ICE. Other optimisation levels work correctly, as does -O0 without
-fschedule-insns2.
g77 3.4.2 built with
../gcc-3.4.2/configure --prefix=/opt/gcc-3.4.2
make -j 2 bootstrap
on a dual Itanium running Linux 2.4.20-mckinley-smp.
Problematic fortran file begins here:
# 1 "surface.F"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "surface.F"
implicit none
integer mx,mz,modes
parameter (mx=256,mz=128)
common /modeblk/ modes
integer i,j
real*8 x,z,eta,pi,delta,t,dt,dx
parameter (pi=3.14159265358979d0,delta=1d0)
real*8 p(mx+2,mz),surf(mx+2),realsurf(mx+2),surfdot(mx+2)
common /p_blk/ p
real*8 preal(mx+2,mz)
real*8 surfx(mx+2),surfxx(mx+2)
integer info(30),itol,istate,itask,mf,iopt,ifail,lid
integer lrw,liw,nvars
parameter (nvars=mx+2)
parameter (liw=1000+3*nvars)
parameter (lrw=1000+20*nvars)
integer iwork(liw)
real*8 rwork(lrw)
real*8 tlast,tprint,tend
external calcdot,psol,jac
real*8 fzint ! function for calculating volume
real*8 rtol,atol
real*8 maxsurf,maxcurv,fluid
character*150 dirname,comname,logname,filename
character*150 timestr
common /dirblk/ dirname
real*8 px(mx+2),peta(mx+2)
common /pdiff_blk/ px,peta
real*8 tension
parameter (tension=(1d-4))
integer slice
parameter (slice=5)
modes=mx ! no adaptivity
dx=2d0*pi/dble(slice*mx)
C initialise free surface
do i=1,mx
x=dble(i-1)*dx
surf(i)=(1d0+0d0*cos(4d0*x))
enddo
do j=1,mz
do i=1,mx
p(i,j)=0d0 ! initial guess for p
enddo
enddo
99 format(20G20.10)
do i=1,30
info(i)=0
enddo
itol=1
itask=1
istate=1
iopt=0
atol=1d-8
rtol=1d-8
t=0d0
tlast=0.001d0
tprint=0d0
open (50,file=comname,status='unknown')
123 continue
tprint=tprint+tlast
if (t.lt.100d0) goto 123
end
--
Summary: ICE: segmentation fault on (believed) correct code
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pdellar at na-net dot ornl dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-unknown-linux-gnu
GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17502