diff options
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; + } } } |