      PROGRAM ERRHANDL
      REAL*4 X,X2
      EXTERNAL EATER
      CALL LIB$ESTABLISH(EATER)
      X=1.0E10
      X2=X*X
      WRITE(*,*) X2
      X=1.0E20
      X2=X*X
      WRITE(*,*) X2
      END
C
      INTEGER*4 FUNCTION EATER(SIG,MECH)
      INTEGER*4 SIG(*),MECH(*)
      INCLUDE '($SSDEF)'
      IF(SIG(2).EQ.SS$_FLTOVF) THEN
        WRITE(*,*) 'FP OVERFLOW'
        CALL SYS$EXIT(%VAL(SS$_FLTOVF))
      ELSE IF(SIG(2).EQ.SS$_FLTOVF_F) THEN
        WRITE(*,*) 'FP OVERFLOW'
        CALL SYS$EXIT(%VAL(SS$_FLTOVF_F))
      ELSE
        EATER=SS$_RESIGNAL
        RETURN
      ENDIF
      EATER=-1
      RETURN
      END
