https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70112
Bug ID: 70112 Summary: [lto] Segmentation fault in Libreoffice's program gengal.bin when build with LTO Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kabel at blackhole dot sk Target Milestone: --- Created attachment 37882 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37882&action=edit gengal-backtrace.txt As Steffen Hau has posted in the comments on PR50394, Libreoffice's program gengal.bin fails with segmentation fault during compilation of Libreoffice itself. I have studied it more, and the problem seems with libreoffice-5.0.5.2/bridges (libgcc3_uno.so), which are "Bridges from various C++ ABIs, Java JNI, MS .Net to UNO and back.", as described by README. When I compiled libgcc3_uno.so with LTO disabled, gengal.bin ran successfully. Attaching gdb's backtrace when segmentation fault. The problem seems to be in the destructor bridges::cpp_uno::shared::CppInterfaceProxy::~CppInterfaceProxy() which is defined in bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx CppInterfaceProxy::~CppInterfaceProxy() {} And also called from there from function freeCppInterfaceProxy: pThis->~CppInterfaceProxy();