Static Data-Race Detection for Multithread Programs