http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46080

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-10-26 
13:41:10 UTC ---
Well, the setting of errno by calling another function has similar effects like
calling any other function in between, if you do
  float a = sqrtf (x);
  foo ();
  float b = sqrtf (x);
  bar ();
  float c = sqrtf (x);
  printf ("%f %f %f\n", a, b, c);
then there is similar problem - every call in between on i?86/x86_64 will
clobber the i387 register stack in the ABI, so the values need to be flushed
into memory and thus with the fast extended precision mode rounded to floating
point precision, but the c value is probably kept in reg-stack and saved as a
double instead of float, because of varargs in printf.  Thus it can have
different value.

Reply via email to