https://sourceware.org/bugzilla/show_bug.cgi?id=30254
Bug ID: 30254 Summary: iostream crashes with ld linker for windows targets Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: euloanty at live dot com Target Milestone: --- Bug issue 29973 was a mess. So I decided to start a new one and close bug 29973. GCC 13 made several changes to iostream, including making it with an __init_priority__ and changing the definition due to the updated win32 thread model changes. I do not know what breaks it. But any program that uses std::cout/std::cin now will crash when dynamically linked with libstdc++. I have tried LLVM lld. lld does not crash the program, but ld crashes. This breaks nearly all C++ programs on windows since they may use iostream in some places, and the entire program crashes. Maybe ld linker does not correctly deal with __init_priority__ for PE targets. However, I am not an expert on the linker and do not know why. It is very near April, and we will get the latest binutils and GCC 13 published, and GCC 14 will be very soon. This issue needs to be addressed as soon as possible so we do not break Windows programs and GCC bootstrapping when GCC 13 is released. -- You are receiving this mail because: You are on the CC list for the bug.