[comp.sys.apollo] ftn inline question

pschenk%cernapo.cern.ch@PUCC.PRINCETON.EDU (Paul Schenk) (06/19/91)

We are hoping that someone out there can let us in on the
secrets of how the fortran compiler decides to inline
things. In particular this little bit of code.

      SUBROUTINE DDTTPK
        IMPLICIT NONE
        INTEGER ITHETA(2000),IPTRWR(4000),ISTRWR(160),IHIT
        INTEGER*4 JBYT
C
        ITHETA(1) = JBYT(IHIT,17,8)
        IPTRWR(ISTRWR(1)) = 1
C
        RETURN
      END
*-------------------------------------------------------------------
%begin_inline
      integer*4 function jbyt(izw,izp,nzb)
        implicit none
        integer*4 izw,izp,nzb
        jbyt = rshft(lshft(izw,33-izp-nzb),32-nzb)
        return
      end
%end_inline

produces :
KORN>ftn ddttpk.bit -opt 4
**** Warning #939 on Line 6:
routine not expanded INLINE at call site (caller + callee too large): jbyt
no errors, 1 warnings, no informational messages,
Fortran 77 compiler PRISM Rev 10.7(304) 1991/04/26 13:14:37 SWI (Fri)

Lowering  the array limits will let the function be inlined,
but how can the "caller + callee"  be too large ? Any help
would be greatly appreciated.

Ciao,
Casper

Paul Schenk       |   University of Victoria
                  |   CERN PPE / OPAL
pschenk%cernapo@cernvax.cern.ch <- Pref.
pschenk@cernvm.cern.ch
schenk@uvvm.bitnet

" I have never seen anything fill up a vacuum so fast and still suck "

                          -Rob Pike on X