summaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-24 20:06:06 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-24 20:06:06 +0000
commit9e9bac20aa32b9bb41ded1bbe0451f67ad99e0a5 (patch)
treed999fb7e88d8800d3714854bcb75706f73511c64 /gcc/tree-inline.c
parente2ba5183ebcdc7716668bf917d57ef8f3bfd0c77 (diff)
downloadgcc-9e9bac20aa32b9bb41ded1bbe0451f67ad99e0a5.tar.gz
* tree-inline.c (tree_function_versioning): Look harder
for referenced vars. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139542 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 7be46cfe7c1..7ef58c3f40c 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -4223,9 +4223,16 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
= (struct ipa_replace_map *) VARRAY_GENERIC_PTR (tree_map, i);
if (replace_info->replace_p)
{
- if (TREE_CODE (replace_info->new_tree) == ADDR_EXPR)
+ tree op = replace_info->new_tree;
+
+ STRIP_NOPS (op);
+
+ if (TREE_CODE (op) == VIEW_CONVERT_EXPR)
+ op = TREE_OPERAND (op, 0);
+
+ if (TREE_CODE (op) == ADDR_EXPR)
{
- tree op = TREE_OPERAND (replace_info->new_tree, 0);
+ op = TREE_OPERAND (op, 0);
while (handled_component_p (op))
op = TREE_OPERAND (op, 0);
if (TREE_CODE (op) == VAR_DECL)