diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2005-04-02 17:08:07 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2005-04-02 17:08:07 +0000 |
commit | 45bc1c8a1dea8967fa62987fef867e4adab7582d (patch) | |
tree | 91913620b789051aec1d96f7ad92a37fce830aeb /gcc/tree-inline.c | |
parent | 0f59e0a88ee52149e5aa1cd31c1a0fac93988580 (diff) |
gcc/ChangeLog:
PR debug/19345
* dwarf2out.c (add_abstract_origin_attribute): Revert accidental
change checked in along with 2005-03-03's patch for debug/20253.
* tree-inline.c (remap_type): Remap TYPE_STUB_DECL.
(remap_decl): Insert type decl in map earlier.
gcc/testsuite/ChangeLog:
* gcc.dg/pr19345.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@97449 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ef284a12bdc..59a2d7237c9 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -172,6 +172,11 @@ remap_decl (tree decl, inline_data *id) /* Make a copy of the variable or label. */ tree t = copy_decl_for_inlining (decl, fn, VARRAY_TREE (id->fns, 0)); + /* Remember it, so that if we encounter this local entity again + we can reuse this copy. Do this early because remap_type may + need this decl for TYPE_STUB_DECL. */ + insert_decl_map (id, decl, t); + /* Remap types, if necessary. */ TREE_TYPE (t) = remap_type (TREE_TYPE (t), id); if (TREE_CODE (t) == TYPE_DECL) @@ -214,9 +219,6 @@ remap_decl (tree decl, inline_data *id) } #endif - /* Remember it, so that if we encounter this local entity - again we can reuse this copy. */ - insert_decl_map (id, decl, t); return t; } @@ -285,6 +287,9 @@ remap_type (tree type, inline_data *id) TYPE_NEXT_VARIANT (new) = NULL; } + if (TYPE_STUB_DECL (type)) + TYPE_STUB_DECL (new) = remap_decl (TYPE_STUB_DECL (type), id); + /* Lazily create pointer and reference types. */ TYPE_POINTER_TO (new) = NULL; TYPE_REFERENCE_TO (new) = NULL; |