Fortran Programming Guide

Floating-Point Exceptions and Fortran

Programs compiled by f77 automatically display a list of accrued floating-point exceptions on program termination. In general, a message results if any one of the invalid, division-by-zero, or overflow exceptions have occurred. Inexact exceptions do not generate messages because they occur so frequently in real programs.

f90 programs do not automatically report on exceptions at program termination. An explicit call to ieee_retrospective(3M) is required.

You can turn off any or all of these messages with ieee_flags() by clearing exception status flags. Do this at the end of your program.