Please try compiling and executing the attached test program on Linux. For me, it produces the correct results: Negative infinity 32 = -inf Positive infinity 32 = inf Not a number 32 = nan Negative infinity 64 = -inf Positive infinity 64 = inf Not a number 64 = nan I'm curious to see whether it produces correct results for you with -O3. I used the following command line: gcc -Wall -O3 -I /home/eiffel/Eiffel13.11.93542/studio/spec/linux-x86/include -o inline_bug -m32 inline_bug.c