diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 530fefd83e4..f7ddeffe004 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-11-13 Andrew Pinski + + PR middle-end/24820 + * builtins.c (integer_valued_real_p): Add break in + REAL_CST having TREE_OVERFLOW set. + 2005-11-13 Zdenek Dvorak * tree-ssa-loop-ivopts.c (get_address_cost): Prevent splitting diff --git a/gcc/builtins.c b/gcc/builtins.c index a9fe8582501..359ff646e98 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -6704,6 +6704,7 @@ integer_valued_real_p (tree t) real_trunc (&cint, TYPE_MODE (TREE_TYPE (t)), &c); return real_identical (&c, &cint); } + break; case NOP_EXPR: { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 388ea7e2f77..805aa20af24 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-11-13 Andrew Pinski + + PR middle-end/24820 + * testsuite/gcc.dg/pr24820.c: New test. + 2005-11-13 Zdenek Dvorak * gcc.dg/tree-ssa/loop-2.c: Fix outcome. diff --git a/gcc/testsuite/gcc.dg/pr24820.c b/gcc/testsuite/gcc.dg/pr24820.c new file mode 100644 index 00000000000..0482ca32118 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr24820.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ffast-math" } */ + +double floor (double); +double bar (double sum) +{ + int i; + for (i = 0; i < 256; i++) + sum += floor (0.5 + (i - 128)); + return sum; +} +