From 37c59e691e40aa4f278ca985f7fa7ab81a0e545d Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 25 May 2012 20:26:11 +0000 Subject: 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 --- gcc/tree-inline.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/tree-inline.c') diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index a987ff0..0190aa9 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); -- cgit v1.1