diff options
author | Alexandre Oliva <aoliva@gcc.gnu.org> | 2009-11-21 05:04:30 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2009-11-21 05:04:30 +0000 |
commit | 21cf718065ecda762be39bd34606b29239d2efaf (patch) | |
tree | 45cdd369007484a44434fbf6ca63aa95185eabd6 /gcc/testsuite/gcc.dg | |
parent | 04482dd1056ef5718524cefc4b43c5ef7eea986f (diff) | |
download | gcc-21cf718065ecda762be39bd34606b29239d2efaf.zip gcc-21cf718065ecda762be39bd34606b29239d2efaf.tar.gz gcc-21cf718065ecda762be39bd34606b29239d2efaf.tar.bz2 |
re PR tree-optimization/42078 (ICE in gimple_assign_set_rhs_code)
gcc/ChangeLog:
PR tree-optimization/42078
* gimple.h (gimple_replace_lhs): New declaration.
* gimple.c (gimple_replace_lhs): New function.
* tree-ssa-math-opts.c (execute_cse_reciprocals): Call it before
modifying the call.
gcc/testsuite/ChangeLog:
PR tree-optimization/42078
* gcc.dg/pr42078.c: New test.
From-SVN: r154400
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr42078.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr42078.c b/gcc/testsuite/gcc.dg/pr42078.c new file mode 100644 index 0000000..8107ff5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr42078.c @@ -0,0 +1,22 @@ +/* PR tree-optimization/42078 */ +/* { dg-do compile } */ +/* { dg-options "-g -O -ffast-math" } */ + +double sqrt (double x); + +float +foo (float x) +{ + float y = sqrt (x); + return x / y; +} + +inline float +bar (float x) +{ + float y = sqrt (x); + float a = y; + float b = y; + float c = y; + return x / y; +} |