This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/29798] [4.3 Regression] -O2 gives wrong results



------- Comment #11 from bonzini at gnu dot org  2006-11-13 11:02 -------
reduced testcase:

#include <stdlib.h>

int
main ()
{
  int i;
  double oldrho;
  double beta = 0.0;
  double work = 1.0;
  for (i = 1; i <= 2; i++)
    {
      double rho = work * work;
      if (i != 1)
        beta = rho / oldrho;
      if (beta == 1.0)
        abort ();
      work /= 2.0;
      oldrho = rho;
    }
  return 0;
}


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]