C:\bugreport>ld -v GNU ld (GNU Binutils) 2.21.51.20110326 C:\bugreport>gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/i686-pc-mingw32/4.6.0/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ../src/configure --prefix=/c/temp/gcc/dest --enable-languages=c,c++ --with-arch=i686 --with-tune=generic --disable-libstdcxx-pch --disable-nls --disable-shared --disable-sjlj-exceptions --disable-win32-registry --enable-checking=release --enable-lto Thread model: win32 gcc version 4.6.0 (GCC) C:\bugreport>type foo.cpp #include <iostream> #include <ostream> using namespace std; int main() { cout << "Hello, C++ world!" << endl; } C:\bugreport>g++ foo.cpp -o foo1.exe C:\bugreport>foo1 Hello, C++ world! C:\bugreport>g++ -flto -fno-use-linker-plugin foo.cpp -o foo2.exe C:\bugreport>foo2 Hello, C++ world! C:\bugreport>g++ -flto -fuse-linker-plugin foo.cpp -o foo3.exe C:\bugreport>foo3 Hello, C++ world! C:\bugreport>type bar.c #include <stdio.h> int main(void) { puts("Hello, C world!"); return 0; } C:\bugreport>gcc bar.c -o bar1.exe C:\bugreport>bar1 Hello, C world! C:\bugreport>gcc -flto -fno-use-linker-plugin bar.c -o bar2.exe C:\bugreport>bar2 Hello, C world! C:\bugreport>gcc -flto -fuse-linker-plugin bar.c -o bar3.exe C:\bugreport>bar3 [Window Title] Microsoft Windows [Main Instruction] bar3.exe has stopped working [Content] Windows can check online for a solution to the problem. [^] Hide problem details [Check online for a solution and close the program] [Close the program] Problem signature: Problem Event Name: APPCRASH Application Name: bar3.exe Application Version: 0.0.0.0 Application Timestamp: 4d90117c Fault Module Name: StackHash_fd00 Fault Module Version: 0.0.0.0 Fault Module Timestamp: 00000000 Exception Code: c0000005 Exception Offset: 00000000 OS Version: 6.0.6002.2.2.0.256.1 Locale ID: 1033 Additional Information 1: fd00 Additional Information 2: ea6f5fe8924aaa756324d57f87834160 Additional Information 3: fd00 Additional Information 4: ea6f5fe8924aaa756324d57f87834160 Read our privacy statement: http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409
It can be a duplicate of bug 47891.
Please also specify the exact linker version you are using.
(In reply to comment #2) Gordon Magnusson wrote: > C:\bugreport>ld -v > GNU ld (GNU Binutils) 2.21.51.20110326
*** This bug has been marked as a duplicate of bug 47891 ***