core.atomic and -profile switch

Saurabh Das saurabh.das at gmail.com
Wed Apr 2 03:18:20 PDT 2014


Hello

For this test program ('test.d'):

import core.atomic;
int func1(shared int a)
{
     return atomicLoad(a);
}

These invocations of dmd succeed:
1. dmd -main test.d
2. dmd -main -debug test.d
3. dmd -main -release test.d

But this one fails:
dmd -main -profile test.d

With error:
/usr/include/dmd/druntime/import/core/atomic.d(910): Error: asm 
statements are assumed to throw

Is there a workaround for this? I have a decent sized codebase 
which I wish to profile for hotspots - but it won't compile with 
'-profile'.

Warm Regards,
Saurabh



More information about the Digitalmars-d-learn mailing list