Fix bug wrt gcc atomic primitive.