aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-05-25 20:26:11 +0000
committerEric Botcazou <ebotcazou@adacore.com>2012-05-25 20:26:11 +0000
commit2e47a1c41eff226efb3638113c328baf13a65b97 (patch)
tree4b88d16d1ec638d995e6e57ed4c9c3b58437eff7 /gcc/tree-inline.c
parent8aa630df8b179c5f16d028919b7763801a97b401 (diff)
PR lto/52178
* tree-inline.c (remap_gimple_op_r): Fix handling of FIELD_DECL. * tree.c (RETURN_TRUE_IF_VAR): Do not return true for PLACEHOLDER_EXPR. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@187892 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index a987ff0f8ae..0190aa953f5 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -818,6 +818,15 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
|| decl_function_context (*tp) == id->src_fn))
/* These may need to be remapped for EH handling. */
*tp = remap_decl (*tp, id);
+ else if (TREE_CODE (*tp) == FIELD_DECL)
+ {
+ /* If the enclosing record type is variably_modified_type_p, the field
+ has already been remapped. Otherwise, it need not be. */
+ tree *n = (tree *) pointer_map_contains (id->decl_map, *tp);
+ if (n)
+ *tp = *n;
+ *walk_subtrees = 0;
+ }
else if (TYPE_P (*tp))
/* Types may need remapping as well. */
*tp = remap_type (*tp, id);