[cfe-dev] Clang error
Gonsolo
gonsolo at gmail.com
Mon Mar 1 13:59:30 PST 2010
With clang version 97437 and llvm 97442 built in Release mode I get the
following error:
Stack dump:
0. Program arguments: /home/gonzo/bin/clang -cc1 -triple
i386-pc-linux-gnu -S -disable-free -disable-llvm-verifier
-main-file-name bla.cc -mrelocation-model static -mdisable-fp-elim
-mconstructor-aliases -target-cpu pentium4 -g -resource-dir
/home/gonzo/lib/clang/1.1 -Wall -Wextra -fmessage-length 177
-fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics
-o /tmp/cc-byEFZN.s -x c++ bla.cc
1. <eof> parser at end of file
2. Code generation
3. Running pass 'X86 DAG->DAG Instruction Selection' on function
'@atomic_exchange_and_add'
clang: error: compiler command failed due to signal 11 (use -v to see
invocation)
when compiling the following file:
#include <boost/shared_ptr.hpp>
using ::boost::shared_ptr;
class A {};
int main()
{
shared_ptr<A> a;
}
Debug mode seems to work.
Reduced testcase:
inline int atomic_exchange_and_add( int * pw, int dv )
{
int r;
__asm__ __volatile__
(
"lock\n\t"
"xadd %1, %0":
"=m"( *pw ), "=r"( r ):
"m"( *pw ), "1"( dv ):
"memory", "cc"
);
return r;
}
void release() {
int use_count_;
if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) { }
}
g
More information about the cfe-dev
mailing list