public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37121]  New: g++ create global symbol for inline function, which make link failed with multiple defination
@ 2008-08-14  7:04 drangon dot mail at gmail dot com
  2008-09-25  4:46 ` [Bug target/37121] " drangon dot mail at gmail dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: drangon dot mail at gmail dot com @ 2008-08-14  7:04 UTC (permalink / raw)
  To: gcc-bugs

when use g++ to build wxWidgets in x86_64-pc-mingw32, it output following error
:

------------------
E:\work\09_workroom\wxtest\png>mingw32-make -f Makefile.mingw
WX_DIR=e:\code\wx6
4 CXX=e:\code\target\bin\g++.exe
e:\code\target\bin\g++.exe -g -Wall -pipe  -D__WXMSW__ -D__WXDEBUG__ -DWIN32
-D_
WINDOWS -Ie:\code\wx64/include -Ie:\code\wx64/lib/mswd  png.o  stdafx.o -o
png.e
xe -mwindows -Le:\code\wx64/lib -lwxmsw28d_core -lwxbase28d -lwxpngd -lwxzlibd
-
lgdi32 -lole32 -loleaut32 -lwinmm -lcomctl32 -lcomdlg32 -lwinspool -luuid
-lshel
l32 -lrpcrt4
e:/code/target/bin/../lib/gcc/x86_64-pc-mingw32/4.3.2/../../../../x86_64-pc-ming
w32/lib/libmingwex.a(lib64_libmingwex_a-wininterlocked.o):wininterlocked.c:(.tex
t+0x43b): multiple definition of `_InterlockedIncrement'
e:\code\wx64/lib/libwxbase28d.a(baselib_thread.o):thread.cpp:(.text$_Interlocked
Increment[__InterlockedIncrement]+0x0): first defined here
e:/code/target/bin/../lib/gcc/x86_64-pc-mingw32/4.3.2/../../../../x86_64-pc-ming
w32/lib/libmingwex.a(lib64_libmingwex_a-wininterlocked.o):wininterlocked.c:(.tex
t+0x487): multiple definition of `_InterlockedDecrement'
e:\code\wx64/lib/libwxbase28d.a(baselib_thread.o):thread.cpp:(.text$_Interlocked
Decrement[__InterlockedDecrement]+0x0): first defined here
collect2: ld returned 1 exit status
mingw32-make: *** [png.exe] Error 1     
-----------------

_InterlockedDecrement is an inline function, it should not in baselib_thread.o,
when built with "-O1", its ok. when built with "-O2", g++ crashed.
see attachment for more infomation.


-- 
           Summary: g++ create global symbol for inline function, which make
                    link failed with multiple defination
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drangon dot mail at gmail dot com
 GCC build triplet: x86_64-redhat-linux-gnu
  GCC host triplet: x86_64-pc-mingw32
GCC target triplet: x86_64-pc-mingw32


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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-08-18 11:03 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-14  7:04 [Bug c++/37121] New: g++ create global symbol for inline function, which make link failed with multiple defination drangon dot mail at gmail dot com
2008-09-25  4:46 ` [Bug target/37121] " drangon dot mail at gmail dot com
2008-09-25  4:48 ` drangon dot mail at gmail dot com
2008-09-25  4:49 ` drangon dot mail at gmail dot com
2008-09-25  4:50 ` drangon dot mail at gmail dot com
2008-09-25  4:50 ` drangon dot mail at gmail dot com
2008-09-25  5:01 ` nightstrike at gmail dot com
2008-09-26  0:34 ` drangon dot mail at gmail dot com
2009-02-28 17:48 ` ktietz at gcc dot gnu dot org
2009-03-07 14:52 ` drangon dot mail at gmail dot com
2009-03-07 15:02 ` drangon dot mail at gmail dot com
2009-03-07 15:10 ` drangon dot mail at gmail dot com
2009-03-09  2:10 ` nightstrike at gmail dot com
2009-03-09  7:46 ` dannysmith at users dot sourceforge dot net
2009-04-21  5:35 ` [Bug target/37121] g++ create global symbol for inline function, which make link failed with multiple definitions drangon dot mail at gmail dot com
2009-04-21  7:01 ` dannysmith at users dot sourceforge dot net
2009-04-21  8:27 ` ktietz at gcc dot gnu dot org
2009-04-21  8:50 ` ktietz at gcc dot gnu dot org
2009-08-18 11:03 ` ktietz at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).