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
This commit is contained in:
Eric Botcazou 2012-05-25 20:26:11 +00:00 committed by Eric Botcazou
parent 13af22d7a0
commit 37c59e691e
3 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
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.
2012-05-25 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/t-linux64: Delete the 32-bit multilib that uses

View File

@ -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);

View File

@ -8477,8 +8477,11 @@ variably_modified_type_p (tree type, tree fn)
a variable in FN. */
#define RETURN_TRUE_IF_VAR(T) \
do { tree _t = (T); \
if (_t && _t != error_mark_node && TREE_CODE (_t) != INTEGER_CST \
&& (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL))) \
if (_t != NULL_TREE \
&& _t != error_mark_node \
&& TREE_CODE (_t) != INTEGER_CST \
&& TREE_CODE (_t) != PLACEHOLDER_EXPR \
&& (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL))) \
return true; } while (0)
if (type == error_mark_node)