Opened 8 years ago

Closed 7 years ago

#10994 closed Bugs (fixed)

Using boost::atomic for 128-bit type results in build error with GCC 4.4

Reported by: Martin Srom <srom.martin@…> Owned by: timblechmann
Milestone: To Be Determined Component: atomic
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc: Andrey.Semashev@…

Description

When using boost::atomic with 128-bit type it results into a build error with GCC 4.4.

With GCC 4.6 it works fine. With 64-bit type it works fine.

Minimal example:

main.cpp:

#include <boost/atomic.hpp>

int main()
{
    boost::atomic<__int128_t> variable(0);
    variable.load();   
} 

Build command:

g++-4.4 -O3 -mcx16 main.cpp -Iboost_1_57_0/

Error output:

boost_1_57_0/boost/atomic/detail/ops_gcc_x86_dcas.hpp: In function ‘int main()’:
boost_1_57_0/boost/atomic/detail/ops_gcc_x86_dcas.hpp:261: error: impossible constraint in ‘asm’

Attachments (1)

main.cpp (108 bytes ) - added by Martin Srom <srom.martin@…> 8 years ago.

Download all attachments as: .zip

Change History (3)

by Martin Srom <srom.martin@…>, 8 years ago

Attachment: main.cpp added

comment:1 by Andrey Semashev, 7 years ago

Cc: Andrey.Semashev@… added

comment:2 by Andrey Semashev, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.