https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66239
ktkachov at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ktkachov at gcc dot gnu.org --- Comment #3 from ktkachov at gcc dot gnu.org --- FWIW I can't reproduce on a bare-metal arm-none-eabi trunk (i.e. future GCC 6) With: -mcpu=cortex-a8 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb-interwork -mfpu=neon -Wall -Wextra -mfloat-abi=soft prsqrt.c -specs=rdimon.specs -lm I get: 3.016621 3.016621 3.016621 3.016621 Note that I also had to add -lm to link the sqrt and sqrtf functions in. Considering that the -O0 version is the only one that ends up calling the library functions, perhaps there's something wrong with your math library? I'm using newlib for arm-none-eabi