// 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( [] { int r = a; assert( r == 0 || r == 2 ); /* ERROR */ } ); a = 1; a = 2; t.join(); }