https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608
--- Comment #42 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Richard Biener from comment #41) > We could fix the testcase with > > diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr95115.c > index 69c4f83250c..09273e445d2 100644 > --- a/gcc/testsuite/gcc.dg/pr95115.c > +++ b/gcc/testsuite/gcc.dg/pr95115.c > @@ -17,6 +17,7 @@ int > main (void) > { > double r = x (); > + volatile double rr = r; > if (!__builtin_isnan (r)) > abort (); > if (!fetestexcept (FE_INVALID)) > > that preserves optimizing the isnan check but also preserves the computation > and checks the non-propagation of a NaN. Hmm, so it means we cannot rely on Inf / Inf to raise an exception? Then we need to fix Glibc...