diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-22 23:11:15 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-22 23:11:15 +0000 |
commit | 90b56f40c147d5eff51e79d8d673d539c845a4d1 (patch) | |
tree | 466302702261d13e0284a991a22c4b62dc8aa24f /gcc/testsuite | |
parent | 1c5afb804e03f0a2a071cdf5b2a5c25ab6fa094b (diff) | |
download | gcc-90b56f40c147d5eff51e79d8d673d539c845a4d1.tar.gz |
PR tree-optimization/29921
* fold-const.c (operand_equal_p): Without HONOR_SIGNED_ZEROS, consider
signed and unsigned zero equal.
* gcc.dg/pr29921.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119102 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr29921.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff2a80dad5b..f8dc647d4e0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-11-23 Zdenek Dvorak <dvorakz@suse.cz> + + PR tree-optimization/29921 + * gcc.dg/pr29921.c: New test. + 2006-11-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> PR fortran/29441 diff --git a/gcc/testsuite/gcc.dg/pr29921.c b/gcc/testsuite/gcc.dg/pr29921.c new file mode 100644 index 00000000000..7689f54ce25 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr29921.c @@ -0,0 +1,20 @@ +/* With -ffast-math, the latice value for t changes from -0.0 to 0.0 in this + testcase. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -ffast-math" } */ + +double test (int param) +{ + double a = 0.0, b = -1.0, t; + int i; + + for (i = 0; i < 100; i++) + { + t = a * b; + if (param) + b = 2.0; + } + + return t; +} |