@djb @wingo You don't have a NaN, you have an object of type int. You take its address (fine), convert it to void * (fine), then convert that to float * (dubious). I'm pretty sure the C standard says that converting from void * to float * is fine, but it says nothing about what that resulting pointer actually points to, so dereferencing that may already be UB by omission.
And accessing an object of type int via an lvalue that is not compatible with int is straight up listed as undefined behavior in C99 J.2.