gcc 4.9.4, 5.4.0, and 7.2.0 all fail with this error:
C:\Users\username\repos\project\bin\boost-win64-1.57/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*; decltype (*(forward<A0>)(*boost::detail::invoke::a0).**boost::detail::invoke::f) = void (A::)()]': C:\Users\username\repos\project\bin\boost-win64-1.57/boost/thread/detail/invoke.hpp:102:43: internal compiler error: in gimplify_expr, at gimplify.c:8858 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See <http://sourceforge.net/projects/mingw-w64> for instructions.
On the following minimum test case:
#include <boost/thread.hpp> class A { public: A() {} void doA(); private: void doB() { } boost::once_flag onceFlag; }; void A::doA() { boost::call_once(onceFlag, &A::doB, this); }
I've attached gcc's intermediate output so you don't need the boost/thread.hpp include to see the error.
Compile it like so:
x86_64-5.4.0-release-win32-seh-rt_v5-rev0/mingw64/bin/g++ -std=c++11 TestClass.ii
Confirmed on GCC 7.2.1 . This seems a GCC bug. Please report it to https://gcc.gnu.org/bugzilla/ .