diff options
author | spark <spark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-14 05:48:35 +0000 |
---|---|---|
committer | spark <spark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-14 05:48:35 +0000 |
commit | fdf6266dd09ad6aefa7e36685d7f01fa4005744b (patch) | |
tree | b1cd7e69e39cc361885098ef2120d09353c8c59f /gcc/tree-nrv.c | |
parent | 5097c504d523940bf26c043dbda7c2ef34c2b8ad (diff) | |
download | gcc-fdf6266dd09ad6aefa7e36685d7f01fa4005744b.tar.gz |
2007-03-13 Seongbae Park <seongbae.park@gmail.com>
PR tree-optimization/30590
* tree-nrv.c (tree_nrv): Check for the partial update of the
return value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122909 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nrv.c')
-rw-r--r-- | gcc/tree-nrv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c index c33ff0ea31a..906b98fbc8a 100644 --- a/gcc/tree-nrv.c +++ b/gcc/tree-nrv.c @@ -163,6 +163,14 @@ tree_nrv (void) result_type)) return 0; } + else if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT) + { + tree addr = get_base_address (GIMPLE_STMT_OPERAND (stmt, 0)); + /* If there's any MODIFY of component of RESULT, + then bail out. */ + if (addr && addr == result) + return 0; + } } } |