diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-06-19 23:27:01 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-06-19 23:27:01 +0000 |
commit | ecdeb77c8b75a2e5627fb260719281ba1d3bd782 (patch) | |
tree | c07c8e60173ae55dbf015fef35e583083f8534c3 /gcc/integrate.c | |
parent | e7c6a8e53ff71971f4252aeb21d3d8798eb467cf (diff) | |
download | ppe42-gcc-ecdeb77c8b75a2e5627fb260719281ba1d3bd782.tar.gz ppe42-gcc-ecdeb77c8b75a2e5627fb260719281ba1d3bd782.zip |
(integrate_decl_tree): Only set DECL_ABSTRACT_ORIGIN if the decl
returned by pushdecl is the one we started with.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10018 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 64248047371..525977aceca 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1968,6 +1968,7 @@ integrate_decl_tree (let, level, map) for (t = BLOCK_VARS (let); t; t = TREE_CHAIN (t)) { tree d; + tree newd; push_obstacks_nochange (); saveable_allocation (); @@ -1986,13 +1987,19 @@ integrate_decl_tree (let, level, map) } /* These args would always appear unused, if not for this. */ TREE_USED (d) = 1; - /* Prevent warning for shadowing with these. */ - DECL_ABSTRACT_ORIGIN (d) = t; if (DECL_LANG_SPECIFIC (d)) copy_lang_decl (d); - pushdecl (d); + newd = pushdecl (d); + + /* If the decl we get back is the copy of 't' that we started with, + then set the DECL_ABSTRACT_ORIGIN. Otherwise, we must have a + duplicate decl, and we got the older one back. In that case, setting + DECL_ABSTRACT_ORIGIN is not appropriate. */ + if (newd == d) + /* Prevent warning for shadowing with these. */ + DECL_ABSTRACT_ORIGIN (d) = t; } for (t = BLOCK_SUBBLOCKS (let); t; t = TREE_CHAIN (t)) |