diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-04-14 00:00:20 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-04-13 20:00:20 -0400 |
commit | 187e7864337597cc947f2c76144e6fe5cb26c40e (patch) | |
tree | 696501aa65aa3c1fc1651a2d04266e75a06957a4 /gcc | |
parent | bb524860e21bbd216bc93a6545b73db47f5603c9 (diff) | |
download | gcc-187e7864337597cc947f2c76144e6fe5cb26c40e.zip gcc-187e7864337597cc947f2c76144e6fe5cb26c40e.tar.gz gcc-187e7864337597cc947f2c76144e6fe5cb26c40e.tar.bz2 |
decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead of the decls themselves.
* decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
of the decls themselves.
From-SVN: r26435
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1f01cd3..b320d5d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1999-04-13 Jason Merrill <jason@yorick.cygnus.com> + * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead + of the decls themselves. + * pt.c (tsubst_function_type): Copy attributes over. * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 0ba19fd..4ea3035 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2897,7 +2897,14 @@ setup_initp () p = &static_aggregates; for (; *p; ) { - t = value_member (TREE_VALUE (*p), static_aggregates_initp); + /* We check for symbol equivalence rather than identical decls + because decl_attributes is run before duplicate_decls. + XXX change to use DECL_MACHINE_ATTRIBUTES instead of + static_aggregates_initp. */ + for (t = static_aggregates_initp; t; t = TREE_CHAIN (t)) + if (DECL_ASSEMBLER_NAME (TREE_VALUE (t)) + == DECL_ASSEMBLER_NAME (TREE_VALUE (*p))) + break; if (t) { |