https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #4 from kargl at gcc dot gnu.org --- (In reply to Bill Sacks from comment #3) > Thanks for pointing that out, kargl. I'm fine with this being closed if it's > not actually a bug: it's not causing me any problems, I just happened to > notice it in the course of investigating other aspects of gfortran's NaN > handling. It's a bug that may eventually get addressed. The TODO note affirms that it's a bug. Unfortunately, gfortran is lacking sufficient man-power at the moment to chase down all the bugs. I don't remember if gfortran's IEEE support uses routines covered by fenv.h, but one might be about to use a combination of feclearexcept(), fegetexceptflag(), feraiseexcept(), fesetexceptflag(), and fetestexcept() to get what you want.