[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2009-03-09 Thread dannysmith at users dot sourceforge dot net


--- Comment #13 from dannysmith at users dot sourceforge dot net  
2009-03-09 07:46 ---
(In reply to comment #12)
 Was this broken in 4.3 compilers?  Is it a 4.4 regression?
 
This is not a new bug in the compiler (the same multiple definition will occur
with 3.4.5)  , but an old 'feature' of the the PE-COFF linker

_InterlockedIncrement is defined as an ordinary  C library function  in
lib64_libmingwex_a-wininterlocked.o

In thread.cpp, it is defined and emitted using linkonce semantics (it is put
into its own .text$_InterlockedIncrement link_once sections, which is how
PE-COFF implements vague linkage.

The linker grabs the one and only .text$_InterlockedIncrement section in
thread.o and then while resolving another symbol it needs from
lib64_libmingwex_a-wininterlocked.o finds an ordinary (not .linkonce)
definition InterlockedIncrement

Hence the multiple definition.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2009-03-08 Thread nightstrike at gmail dot com


--- Comment #12 from nightstrike at gmail dot com  2009-03-09 02:10 ---
Was this broken in 4.3 compilers?  Is it a 4.4 regression?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2009-03-07 Thread drangon dot mail at gmail dot com


--- Comment #9 from drangon dot mail at gmail dot com  2009-03-07 14:52 
---
(In reply to comment #8)
 I can't test your precompiled code, because c++ has changed in an incompatible
 way. Could you attach a current precompiled version using gcc4.4 of it?
 Is the problem still present on 4.4.0 ?
 

I built the native toolchain using the newest source code, the problem still
present.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2009-03-07 Thread drangon dot mail at gmail dot com


--- Comment #10 from drangon dot mail at gmail dot com  2009-03-07 15:02 
---
Created an attachment (id=17413)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17413action=view)
gcc -E output ( gcc 4.4.0 svn 20090307 )


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2009-03-07 Thread drangon dot mail at gmail dot com


--- Comment #11 from drangon dot mail at gmail dot com  2009-03-07 15:10 
---
Created an attachment (id=17414)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17414action=view)
the output object of thread.o


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2009-02-28 Thread ktietz at gcc dot gnu dot org


--- Comment #8 from ktietz at gcc dot gnu dot org  2009-02-28 17:48 ---
I can't test your precompiled code, because c++ has changed in an incompatible
way. Could you attach a current precompiled version using gcc4.4 of it?
Is the problem still present on 4.4.0 ?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2008-09-25 Thread drangon dot mail at gmail dot com


--- Comment #7 from drangon dot mail at gmail dot com  2008-09-26 00:33 
---
I'm using the win64 native compiler:

E:\codeg++ -v
Using built-in specs.
Target: x86_64-pc-mingw32
Configured with: ../gcc/configure --host=x86_64-pc-mingw32
--target=x86_64-pc-mi
ngw32 --disable-nls --enable-languages=c,c++
--with-gmp=/home/drangon/mingw/for_
target --enable-twoprocess --prefix=/home/drangon/mingw/target
--with-sysroot=/h
ome/drangon/mingw/target
Thread model: win32
gcc version 4.4.0 20080814 (experimental) (GCC)


-- 

drangon dot mail at gmail dot com changed:

   What|Removed |Added

 CC||drangon dot mail at gmail
   ||dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2008-09-24 Thread drangon dot mail at gmail dot com


--- Comment #1 from drangon dot mail at gmail dot com  2008-09-25 04:45 
---
Created an attachment (id=16405)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16405action=view)
output of gcc -E


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2008-09-24 Thread drangon dot mail at gmail dot com


--- Comment #2 from drangon dot mail at gmail dot com  2008-09-25 04:47 
---
Created an attachment (id=16406)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16406action=view)
output of nm, the object is build by gcc -O0


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2008-09-24 Thread drangon dot mail at gmail dot com


--- Comment #3 from drangon dot mail at gmail dot com  2008-09-25 04:48 
---
Created an attachment (id=16407)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16407action=view)
output of nm, the object is build by gcc -O1


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2008-09-24 Thread drangon dot mail at gmail dot com


--- Comment #4 from drangon dot mail at gmail dot com  2008-09-25 04:48 
---
Created an attachment (id=16408)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16408action=view)
output of objdump, the object is build by gcc -O0


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2008-09-24 Thread drangon dot mail at gmail dot com


--- Comment #5 from drangon dot mail at gmail dot com  2008-09-25 04:49 
---
Created an attachment (id=16409)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16409action=view)
output of objdump, the object is build by gcc -O1


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121



[Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple defination

2008-09-24 Thread nightstrike at gmail dot com


--- Comment #6 from nightstrike at gmail dot com  2008-09-25 05:00 ---
What is the output of g++ -v?

Are you using the win32 cross compiler, or the win64 native compiler?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37121