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]

internal compiler error


This could be already known.

Ron Young



gfc -c -O3 -msse -mfpmath=sse -ipa -mtune=pentium3 yhalf. for

yhalf.for: In function 'yhalf':
yhalf.for:156: error: unrecognizable insn:
(insn 29 28 31 3 (set (reg:DF 175 [ jz$real ])
       (neg:DF (reg:DF 194))) -1 (nil)
   (expr_list:REG_EQUAL (neg:DF (mem:DF (plus:SI (reg/v/f:SI 188 [ z ])
                   (const_int 8 [0x8])) [2 (* z) S8 A64]))
       (nil)))

yhalf.for:156: internal compiler error: in extract_insn, at recog.c:2077
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[root@myhost bench]# gfc -c -O3 -msse -mfpmath=sse yhalf.for yhalf.for: In function 'yhalf':
yhalf.for:156: error: unrecognizable insn:
(insn 30 29 32 3 (set (reg:DF 175 [ jz$real ])
(neg:DF (reg:DF 194))) -1 (nil)
(expr_list:REG_EQUAL (neg:DF (mem:DF (plus:SI (reg/v/f:SI 188 [ z ])
(const_int 8 [0x8])) [2 (* z) S8 A64]))
(nil)))
yhalf.for:156: internal compiler error: in extract_insn, at recog.c:2077
Please submit a full bug report,
with preprocessed source if appropriate.



See <URL:http://gcc.gnu.org/bugs.html> for instructions.


subroutine yhalf(z,n,b,nback,yw,yv)
c
c ------------------------- DESCRIPTION --------------------------------
c This routine calculates scaled values of the spherical Neumann
c Functions with complex argument.
c
c This routine calculates the
c
c           b    Y(i+1/2)(z)
c  yv(i) = e   -----------------             for i=0..n
c               (2 z/pi)**(1/2)
c
c IT IS ASSUMED THAT n >= 0
c
c The algorithm used is a modified form of the algorithm for the
c computation of the integer order Neumann functions as outlined in
c "The Numerical Computation of Bessel Functions of First and Second
c Kind for Integer Orders and Complex Arguments" by C.F. Du Toit
c IEEE Transactions on Antennas and Propagation Vol 38. No 9 Sep 1990
c
c The modification of the algorithm lies in the calculation of
c y0 and y1 as opposed to Y0 and Y1. In the former, there are simple
c closed form formulae. In the latter, the Bessel functions of the first
c kind are used to calculate Y0 and Y1.
c
c ----------------------- SUBROUTINES and FUNCTIONS --------------------
c
c CALLS  : yback
c
c ------------------------- VARIABLE DESCRIPTION -----------------------
c IN (args)
c z      : argument of the Bessel functions
c n      : see description
c b      : exponent of multiplier  (see description)
c
c WORKSPACE (args)
c yw     : workspace
c
c OUT (args)
c nback  : value used for the start of the backwards recursion (if
c        : needed)
c yv     : vector of bessel functions
c
c LOCAL VARIABLES AND LOCAL PARAMETERS
c alpha  : variable used to appropriately scale one of the sets of
c        : values found in  the backwards recursion.
c beta   : variable used to appropriately scale the other set of
c        : values found by backwards recursion.
c det    : temporary variable used in the calculation of alpha and beta
c y0     : scaled spherical Neumann function of order 0
c y1     : scaled spherical Neumann function of order 1
c expp   : exp(b+j*z)
c expm   : exp(b-j*z)
c jz     : j*z
c zabs   : |z|
c q      : order of the Newmann functions
c i      : loop index
c v      : order at which the backwards recursion is to start
c
c ------------------------- DECLARATIONS -------------------------------
c INPUTS:
     integer n
     complex*16 z,b
c
c WORKSPACE:
     complex*16 yw(0:n)
c
c OUTPUTS:
     integer nback
     complex*16 yv(0:n)
c
c PARAMETERS:
     real*8 SMALL
     parameter (SMALL=1.d-300)
c
c FUNCTIONS  :
     real*8 cdabsj,yback
     complex*16 cdexpj
c
c LOCALS:
     integer i,q
     real*8 zabs,v
     complex*16 jz,y0,y1,expp,expm,alpha,beta,det
c
c ---------------------------- CODE ------------------------------------
c
c y0= -cos(z)/z
c y1= -cos(z)/(z*z) - sin(z)/z
c
c calculate the first two in the sequence * exp(b)
c
c
     zabs=cdabsj(z)
     jz   =(0.d0,1.d0)*z
     expp =cdexpj(b+jz)
     expm =cdexpj(b-jz)
     y0   =(0.d0,-1.d0)*(expp+expm)/(jz+jz)
     y1   =(y0 + (expp-expm)*(0.d0,0.5d0))/z
c
c check if we need to use backward recurrence
c
     if(dimag(z).eq.0.d0)then
       v=1.d0
     else
       v=yback(z)
     endif
c
c if v > 1, then use backwards recurrence with two starting points
c
     nback=idint(v)
     if(nback.gt.1.and.n.gt.1)then
       if(nback.gt.n)nback=n
       yv(nback)  =(0.d0,0.d0)
       yv(nback-1)=(1.d0,0.d0)
       yw(nback)  =(1.d0,0.d0)
       yw(nback-1)=(0.d0,0.d0)
       q           =nback
       do 20 i=1,nback-1,1
         yv(q-2)=dfloat(q+q-1)*yv(q-1)/z - yv(q)
         yw(q-2)=dfloat(q+q-1)*yw(q-1)/z - yw(q)
         q      =q-1
20      continue
c
c now use y0 and y1 to determine the right combination of the two
c solutions
c
c    y0 = alpha*yv(0) + beta*yw(0)
c    y1 = alpha*yv(1) + beta*yw(1)
c
       det  =yv(0)*yw(1)-yw(0)*yv(1)
       alpha=(yw(1)*y0 - yw(0)*y1)/det
       beta =(yv(0)*y1 - yv(1)*y0)/det
c
c go back and recontruct the right values for the rest of the sequence
c
       do 30 i=2,nback,1
         yv(i)=alpha*yv(i)+beta*yw(i)
30      continue
     else
       nback=1
     endif
c
c set up the first two Newmann functions
c
     yv(0)=y0
     if(n.gt.0)then
       yv(1)=y1
c
c finish off the sequence by using forward recursion
c
       do 40 q=nback+1,n,1
         yv(q)=dfloat(q+q-1)*yv(q-1)/z - yv(q-2)
40      continue
     endif
c
     return
     end








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