integer function common_handler (sig, sip, uap) c integer sig, code, address integer sig structure /fault/ integer address end structure structure /siginfo/ integer si_signo integer si_code integer si_errno record /fault/ fault end structure record /siginfo/ sip c if (code .eq. 3) label = 'divide by zero' c if (code .eq. 4) label = 'overflow' c if (code .eq. 5) label = 'underflow' c if (code .eq. 6) label = 'inexact' c if (code .eq. 7) label = 'invalid' c address = sip.fault.address write (0,10) sip.si_code,sip.fault.address 10 format (' exception, sigfpe code ',i1,', at address ',z8) stop end