https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85776
Bug ID: 85776 Summary: ICE when compiling `boost::thread` with `-std=c++11` on mingw-w64 Product: gcc Version: 8.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lh_mouse at 126 dot com Target Milestone: --- Created attachment 44129 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44129&action=edit (though not minimal) testcase Compiling the attached program using `-std=c++11` with boost 1.66 results in an ICE: ``` E:\Desktop>g++ -std=c++11 test.cc In file included from C:/MinGW/MSYS2/mingw32/include/boost/thread/detail/thread.hpp:23, from C:/MinGW/MSYS2/mingw32/include/boost/thread/thread_only.hpp:22, from C:/MinGW/MSYS2/mingw32/include/boost/thread/thread.hpp:12, from C:/MinGW/MSYS2/mingw32/include/boost/thread.hpp:13, from test.cc:1: C:/MinGW/MSYS2/mingw32/include/boost/thread/detail/invoke.hpp: In function 'decltype (*(forward<A0>)(boost::detail::invoke::a0).*boost::detail::invoke::f) boost::detail::invoke(Fp&&, A0&&) [with Fp = void (A::*)(); A0 = A*]': C:/MinGW/MSYS2/mingw32/include/boost/thread/detail/invoke.hpp:102:43: internal compiler error: in gimplify_expr, at gimplify.c:12188 return (*boost::forward<A0>(a0)).*f; ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc-mcf.lhmouse.com/> for instructions. ``` This is confirmed to be the case on 5.4 (native and cross from Linux) and 8.1.1 (native). Preprocessing the testcase results in such an enormous file (5+ MiB) that CReduce has been unable to reduce it at all (it resulted in a `}` only, which was apparently a bug).