diff options
author | Richard Guenther <rguenther@suse.de> | 2007-09-26 15:31:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-09-26 15:31:50 +0000 |
commit | e2e79a188a4aa19a783c3df89aa9cbd6444777c3 (patch) | |
tree | cb57fd79265dda77cbf965d7bad38e0f3baff85e /gcc/testsuite/gcc.dg | |
parent | 68b72a44655ec21cbe3edbf0443d4949ffa6b174 (diff) | |
download | gcc-e2e79a188a4aa19a783c3df89aa9cbd6444777c3.zip gcc-e2e79a188a4aa19a783c3df89aa9cbd6444777c3.tar.gz gcc-e2e79a188a4aa19a783c3df89aa9cbd6444777c3.tar.bz2 |
re PR tree-optimization/33563 (DSE removes non-dead store)
2007-09-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33563
* tree-ssa-dse.c (get_use_of_stmt_lhs): Rename to ...
(get_kill_of_stmt_lhs): ... this. Re-structure. Handle
aggregate stores.
(dse_optimize_stmt): Call get_kill_of_stmt_lhs instead of
get_use_of_stmt_lhs.
* gcc.dg/torture/pr33563.c: New testcase.
From-SVN: r128815
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr33563.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr33563.c b/gcc/testsuite/gcc.dg/torture/pr33563.c new file mode 100644 index 0000000..47907db --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr33563.c @@ -0,0 +1,22 @@ +/* { dg-do run } */ +/* { dg-options "--param max-aliased-vops=0" } */ + +struct T +{ + int a, b; +} t, q; + +int main (void) +{ + struct T *p; + + t.a = 1; + t.b = 2; + q = t; + t.a = 3; + + if (q.a != 1) + __builtin_abort (); + + return 0; +} |