This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12175] [3.4 Regression] Tru64 UNIX bootstrap failure: multiply defined symbols linking libstdc++.so
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Sep 2003 20:17:39 -0000
- Subject: [Bug c++/12175] [3.4 Regression] Tru64 UNIX bootstrap failure: multiply defined symbols linking libstdc++.so
- References: <20030904231700.12175.ro@techfak.uni-bielefeld.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12175
------- Additional Comments From hubicka at ucw dot cz 2003-09-28 20:17 -------
Subject: Re: [3.4 Regression] Tru64 UNIX bootstrap failure: multiply defined symbols linking libstdc++.so
> > Can you also send me the assembly file you get with latest GCC snapshot?
> > You may also try to breakpoint on notice_global_symbol and try to figure
> > out why the symbol passes the tests even tought it is not global.
>
> Attached is the assembler file. I will try a quick look at
> notice_global_symbol.
The symbol in question exists and is external symbol.
I am not quite sure what can call notice_global_symbol on external
symbol, but perhaps the attached patch will help.
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.386
diff -c -3 -p -r1.386 varasm.c
*** varasm.c 23 Sep 2003 19:47:00 -0000 1.386
--- varasm.c 28 Sep 2003 20:15:53 -0000
*************** notice_global_symbol (tree decl)
*** 1043,1048 ****
--- 1043,1049 ----
{
if ((!first_global_object_name || !weak_global_object_name)
&& TREE_PUBLIC (decl) && !DECL_COMMON (decl)
+ && !DECL_EXTERNAL (decl)
&& (TREE_CODE (decl) == FUNCTION_DECL
|| (TREE_CODE (decl) == VAR_DECL
&& (DECL_INITIAL (decl) != 0