diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-08 18:31:39 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-08 18:31:39 +0000 |
commit | 52c2a30751c74e52a07a2905cd875994db2803a8 (patch) | |
tree | 0414cc3da4abf709fe841647da112fa2d898af87 /gcc/tree-nrv.c | |
parent | 5a0046ea4f29a9e700176205b0e5a6ac41417981 (diff) | |
download | gcc-52c2a30751c74e52a07a2905cd875994db2803a8.tar.gz |
2005-01-08 Jeff Law <law@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* tree-nrv.c (tree_nrv): Ignore volatile return values.
* tree-ssa-dse.c (dse_optimize_stmt): Do not optimize
statements with volatile operands.
* tree-ssa-operands.c (add_stmt_operand): Do add volatile
operands after marking a statement with has_volatile_ops.
testsuite/ChangeLog:
2005-01-08 Diego Novillo <dnovillo@redhat.com>
* gcc.dg/pr18241-1.c: New test.
* gcc.dg/pr18241-2.c: New test.
* gcc.dg/pr18241-3.c: New test.
* gcc.dg/pr18241-4.c: New test.
* gcc.dg/pr18241-5.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nrv.c')
-rw-r--r-- | gcc/tree-nrv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c index 0df0712d19c..71de0db82c2 100644 --- a/gcc/tree-nrv.c +++ b/gcc/tree-nrv.c @@ -154,6 +154,7 @@ tree_nrv (void) /* The returned value must be a local automatic variable of the same type and alignment as the function's result. */ if (TREE_CODE (found) != VAR_DECL + || TREE_THIS_VOLATILE (found) || DECL_CONTEXT (found) != current_function_decl || TREE_STATIC (found) || TREE_ADDRESSABLE (found) |