mirror of git://gcc.gnu.org/git/gcc.git
* tree-inline.c (remap_decl): Preserve DECL_ORIGINAL_TYPE invariant.
From-SVN: r237734
This commit is contained in:
parent
277d7ee0c9
commit
cd64be5bca
|
|
@ -1,3 +1,7 @@
|
||||||
|
2016-06-23 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* tree-inline.c (remap_decl): Preserve DECL_ORIGINAL_TYPE invariant.
|
||||||
|
|
||||||
2016-06-23 Andi Kleen <ak@linux.intel.com>
|
2016-06-23 Andi Kleen <ak@linux.intel.com>
|
||||||
|
|
||||||
* Makefile.in: Regenerate.
|
* Makefile.in: Regenerate.
|
||||||
|
|
|
||||||
|
|
@ -367,8 +367,21 @@ remap_decl (tree decl, copy_body_data *id)
|
||||||
/* Remap types, if necessary. */
|
/* Remap types, if necessary. */
|
||||||
TREE_TYPE (t) = remap_type (TREE_TYPE (t), id);
|
TREE_TYPE (t) = remap_type (TREE_TYPE (t), id);
|
||||||
if (TREE_CODE (t) == TYPE_DECL)
|
if (TREE_CODE (t) == TYPE_DECL)
|
||||||
|
{
|
||||||
DECL_ORIGINAL_TYPE (t) = remap_type (DECL_ORIGINAL_TYPE (t), id);
|
DECL_ORIGINAL_TYPE (t) = remap_type (DECL_ORIGINAL_TYPE (t), id);
|
||||||
|
|
||||||
|
/* Preserve the invariant that DECL_ORIGINAL_TYPE != TREE_TYPE,
|
||||||
|
which is enforced in gen_typedef_die when DECL_ABSTRACT_ORIGIN
|
||||||
|
is not set on the TYPE_DECL, for example in LTO mode. */
|
||||||
|
if (DECL_ORIGINAL_TYPE (t) == TREE_TYPE (t))
|
||||||
|
{
|
||||||
|
tree x = build_variant_type_copy (TREE_TYPE (t));
|
||||||
|
TYPE_STUB_DECL (x) = TYPE_STUB_DECL (TREE_TYPE (t));
|
||||||
|
TYPE_NAME (x) = t;
|
||||||
|
DECL_ORIGINAL_TYPE (t) = x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Remap sizes as necessary. */
|
/* Remap sizes as necessary. */
|
||||||
walk_tree (&DECL_SIZE (t), copy_tree_body_r, id, NULL);
|
walk_tree (&DECL_SIZE (t), copy_tree_body_r, id, NULL);
|
||||||
walk_tree (&DECL_SIZE_UNIT (t), copy_tree_body_r, id, NULL);
|
walk_tree (&DECL_SIZE_UNIT (t), copy_tree_body_r, id, NULL);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue