id summary reporter owner description type status milestone component version severity resolution keywords cc 10204 boost::lockfree:queue: g++ -fgnu-tm and -O1/2/3 flag not working philipp.schoppe@… timblechmann "The combination of g++ -fgnu-tm and optimization flags do not work when when using boost::lockfree::queue. {{{ #include int main () { boost::lockfree::queue lfqueue; lfqueue.push(234); return 0; } }}} Compiling it using {{{ g++ -std=c++11 -g -Wall -Werror -lboost_system -fgnu-tm }}} works. Adding -O1 / -O2 / -O3 leads to the error: {{{ In file included from /usr/include/boost/atomic/detail/platform.hpp:22:0, from /usr/include/boost/atomic/atomic.hpp:17, from /usr/include/boost/atomic.hpp:12, from /usr/include/boost/lockfree/detail/atomic.hpp:39, from /usr/include/boost/lockfree/queue.hpp:22, from errtest.cpp:2: /usr/include/boost/atomic/detail/gcc-atomic.hpp: In member function ‘void boost::atomics::detail::base_atomic::store(const value_type&, boost::memory_order) volatile [with T = boost::lockfree::detail::tagged_ptr::node>; bool Sign = false; boost::atomics::detail::base_atomic::value_type = boost::lockfree::detail::tagged_ptr::node>]’: /usr/include/boost/atomic/detail/gcc-atomic.hpp:35:39: error: inlining failed in call to always_inline ‘constexpr int boost::atomics::detail::convert_memory_order_to_gcc(boost::memory_order) noexcept’: BOOST_FORCEINLINE BOOST_CONSTEXPR int convert_memory_order_to_gcc(memory_order order) BOOST_NOEXCEPT ^ In file included from /usr/include/boost/atomic/detail/platform.hpp:22:0, from /usr/include/boost/atomic/atomic.hpp:17, from /usr/include/boost/atomic.hpp:12, from /usr/include/boost/lockfree/detail/atomic.hpp:39, from /usr/include/boost/lockfree/queue.hpp:22, from errtest.cpp:2: /usr/include/boost/atomic/detail/gcc-atomic.hpp:764:87: error: called from here __atomic_store_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order)); }}} I am using an up-to-date arch linux system with gcc 4.9.0 and boost 1.55.0" Bugs closed To Be Determined atomic Boost 1.55.0 Problem wontfix -fgnu-tm -O compiler flag combination Andrey.Semashev@…