mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
re PR tree-optimization/30590 (tree-nrv optimization clobbers return variable)
2007-03-15 Seongbae Park <seongbae.park@gmail.com> PR tree-optimization/30590 * tree-nrv.c (tree_nrv): Check for the partial update of the return value. From-SVN: r122964
This commit is contained in:
committed by
Seongbae Park
parent
842b7c4fa3
commit
385b2d3170
@@ -1,3 +1,9 @@
|
||||
2007-03-15 Seongbae Park <seongbae.park@gmail.com>
|
||||
|
||||
PR tree-optimization/30590
|
||||
* tree-nrv.c (tree_nrv): Check for the partial update
|
||||
of the return value.
|
||||
|
||||
2007-03-14 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* tree-vrp.c (value_inside_range): Ignore fold warnings.
|
||||
|
||||
@@ -163,6 +163,14 @@ tree_nrv (void)
|
||||
result_type))
|
||||
return 0;
|
||||
}
|
||||
else if (TREE_CODE (stmt) == MODIFY_EXPR)
|
||||
{
|
||||
tree addr = get_base_address (TREE_OPERAND (stmt, 0));
|
||||
/* If there's any MODIFY of component of RESULT,
|
||||
then bail out. */
|
||||
if (addr && addr == result)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user