title: arm cortex-m4 hardfault when using -ffast-math
body: <p>I'm trying to launch simple LED blinking application, all works fine but if I add -ffast-math, it goes to hard fault. I debugged via GDB and found that if I add -ffast-math, it inserts call to __arm_set_fast_math from __libc_init_array as part of initialization routine (from .init_array section)</p>
  
  <p>Disassembling __arm_set_fast_math shows:</p>
  
  <pre><code>080001f4 &lt;__arm_set_fast_math&gt;:
   80001f4:       eef1 3a10       vmrs    r3, fpscr
   80001f8:       f043 7380       orr.w   r3, r3, #16777216       ;0x1000000
   80001fc:       eee1 3a10       vmsr    fpscr, r3
   8000200:       4770            bx      lr
   8000202:       bf00            nop
  </code></pre>
  
  <p>According GDB:</p>
  
  <pre><code>0x080001f4 in __arm_set_fast_math ()
  (gdb) stepi
  HardFault_Handler () at src/stm32f4xx_it.c:61
  </code></pre>
  
  <p>it jumps to hardFault handler immediately. removing --fast-math fixes everything. any idea? thanks!</p>