Re: linking time eroor with -fast-math -O0

2011-08-26 Thread Richard Guenther
On Fri, Aug 26, 2011 at 2:52 PM, Vladimir Yakovlev wrote: > Hi, > > Following test fails in linking if compiled with ffast-math and O0, > but it compiled successfully with ffast-math and O2. Also no problem > if -lm is added. > > $ cat t.c > #include > > float foo(float x) > { >   float y = 0; >

linking time eroor with -fast-math -O0

2011-08-26 Thread Vladimir Yakovlev
Hi, Following test fails in linking if compiled with ffast-math and O0, but it compiled successfully with ffast-math and O2. Also no problem if -lm is added. $ cat t.c #include float foo(float x) { float y = 0; while (x > 0.0001) { y += x*x*x*x*x*x*x*x*x*x*x*x*x; x = x/2;