https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93934
--- Comment #24 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Thu, 14 Oct 2021, ubizjak at gmail dot com via Gcc-bugs wrote: > The situation is hopeless from the beginning. Please consider this testcase: > > --cut here-- > #include <cpuid.h> > #include <fenv.h> > > double > __attribute__((noinline,noipa)) > foo (double a, double b, char c) > { > return c ? a : b; > } > > int main () > { > double a = __builtin_nans (""); > double b = 42.0; > > feclearexcept (FE_INVALID); > foo (a, b, 0); This is a fundamentally different test, because it involves (in the abstract machine) lvalue-to-rvalue conversion of a sNaN representation. That means that, unlike the present bug, and the two others I referenced, (a) it's only valid with -fsignaling-nans, (b) it's at most a quality-of-implementation issue because of the rule that assignment to the same format may be a convertFormat operation rather a copy operation, and (c) the ABI means the exception can't be avoided when an sNaN is returned. Effectively, this test is bug 56831, whereas the present bug is more like bug 58416 and bug 71460.