// 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; } ); int r1 = a; int r2 = a; assert( r1 == r2 ); /* ERROR */ t.join(); }