title: GCC: using -O3 optimization flag with the linker
body: <p>I am using g++ 4.8.4 on Linux 14.04 x64.  I am compiling my project with -O3 and -flto flags both during compilation and linking i.e., both CFLAGS and LDFLAGS in my Makefile have these options.</p>
  
  <p>I just discovered that the optimized binary behaves differently (i.e., wrongly) when it comes to computations involving float/double.  Removing the -O3 from LDFLAGS alone seems to be solving the problem.</p>
  
  <p>I remember reading somewhere that it is generally safe to specify the same set of optimization flags to both the compiler and the linker.  Am I wrong in my understanding?  Thanks in advance.</p>