// S : tags error threads min c++ $TAGS // S : expect --result error --location-comment ERROR // S : cc -o test.bc $CC_OPT $file // S : verify -o nofail:malloc $V_OPT test.bc #include #include #include std::atomic_int a; int main() { std::thread t( [] { a = 1; a = 2; } ); assert( a == 0 || a == 2 ); /* ERROR */ t.join(); }