$ cat test.f90

       subroutine testf(b,a,index,n,pad,check1i)
        integer, intent(in) :: n,pad,index(n)
        integer, parameter :: r16=selected_real_kind(15,30)
        integer, save :: n2,n2bit,n4
        real*8, intent(inout) :: a(0:n/8-1+pad,0:7),b(0:n/8-1+pad,0:7),check1i
        real*8 :: check1r,c0,s0,r1,r2,r3,i1,i2,i3,tt
        real*8 :: tr1,tr2,ti1,ti2,c1,s1,c2,s2,c3,s3
        real*8 :: t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16
        real*8, parameter :: rnd_const = 0.75d0 * 2d0**53
        real*8, allocatable, save :: w1(:,:),w2(:,:)
        real(kind=r16), save ::
mt,one=1,two=2,one_fourth,pi,theta,theta2,theta4,mt2,mt4
        logical, save :: first_entry=.true.

          n2=n/2; n2bit=nint(log(1d0*n2)/log(2d0))
          n4=n/4

          allocate(w1(2,n4))

          j=1
          mm=1

          if(mod(n2bit,3)==1)then
            do m=1,n4-1
              mt =m*theta
              w2(1,j)=cos(mt)
              w2(2,j)=sin(mt)
              j=j+1
            enddo
          endif
        if(n2==1048576)then; GOTO 1; endif
        if(n2==2097152)GOTO 1
        STOP
1       continue
        tt=a(0,0)
        if(n2==4096)then; a=b; RETURN; endif
        if(n2==32768)RETURN
        if(n2==65536)then
          RETURN
        endif
        if(n2==131072)then
          RETURN
        endif
        if(n2==262144)then; a=b; RETURN; endif
        if(n2==524288)then
          RETURN
        endif
        if(n2==1048576)then
          RETURN
        endif
        if(n2==2097152)RETURN
        STOP
        end subroutine testf

$ elm3b11:/home/pawar> /opt/gcc-nightly/trunk-20060323/bin/gfortran -c -o
test.o -ftree-loop-linear -O2 -m32    test.f90
gfortran: Internal error: Segmentation fault (program f951)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 

This is a reduced test case from 189.lucas benchmark. It could be reduced
further. But I'm getting different errors if I try to do that.


-- 
           Summary: ICE in f951 on valid code at -O2 -ftree-loop-linear
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: uttamp at us dot ibm dot com
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26835

Reply via email to