https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101795
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- Hint: -fno-trapping-math lets it compile. It should probably be accepted in a manifestly_const_eval context, although some in the committee wanted to prevent the use of NaN (and sometimes even infinity!) in constant expressions...