On Thu, 5 Jun 2025, Nicola Giuliani via Gcc-help wrote:
What do you think of this particular problem? Does it make any sense to you? Can you tell me how to recover the same behavior at linking time without turning on the unsafe math optimizations?
To understand what is going on, add -v to the compile line. This will show you how the linker (possibly called collect2 or ld) is invoked. Do it once with -funsafe-math-optimizations and once without. Look at the diff. Notice the addition of crtfastmath.o. (if motivated, look at the source https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/config/i386/crtfastmath.c;hb=HEAD )
-- Marc Glisse