summaryrefslogtreecommitdiff
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@gcc.gnu.org>2012-05-25 20:26:11 +0000
commit37c59e691e40aa4f278ca985f7fa7ab81a0e545d (patch)
tree4b88d16d1ec638d995e6e57ed4c9c3b58437eff7 /gcc/tree-inline.c
parent13af22d7a0dfc4db342ba39035784ba60e327790 (diff)
downloadgcc-37c59e691e40aa4f278ca985f7fa7ab81a0e545d.tar.gz
re PR lto/52178 (Ada bootstrap failure in LTO mode)
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. From-SVN: r187892
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);