// S : tags error min threads c c11 race $TAGS // S : expect --result error --location-comment ERROR // S : cc -o test.bc -std=c11 $CC_OPT $file // S : verify $V_OPT test.bc #include #include int shared = 0; int thread( void *x ) { ++shared; return 42; } int main() { thrd_t tid; thrd_create( &tid, thread, NULL ); ++shared; int res; thrd_join( tid, &res ); assert( res == 42 ); assert( shared == 2 ); /* ERROR */ return 0; }