__tm_abort failure in Linux

__tm_abort failure in Linux

The __tm_abort instruction doesn't seem to work properly to roll back the transaction under Linux. A case is as follows(almost the same as in the previous post).

No matterif I mark foo as tm_callable or not, the output is 4. (Actually it doesn't matter if there is a foo. An "a++" will also cause the output to be 1 forever). And if I put on "if(b==0)", the compilation will simply abort because of "(0): internal error: backend signals".

The Windows version works cool here (I mean it does roll back the transaction and produceNO internal error).

Btw, I'm using gcc4.2.3 here so I added an intel_compatibility.h to get everything compiled. It basicly redefines __sync_fetch_and_add as _InterlockedExchangeAdd.

#include "intel_compatibility.h"
using namespace std;
int foo(int a){
return a+3;

int main(){
int a=0;
int b=0;
// if(b==0)
cout<<"new a "<}
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This looks to me like a compiler issue on Linux. If you compile with -g then you get the correct results... (a == 0).

This is a bug in the compiler both on Linux and Windows, we discovered this bug (conditional aborts) in the late stage of release cycle and could not get the fix into the release compiler.

Leave a Comment

Please sign in to add a comment. Not a member? Join today