Pope Pius XI
Quadragesimo Anno §124
Quadragesimo Anno: On Reconstruction of the Social Order
124 In the anxiety of Our paternal solicitude, We give Ourselves to reflection and try to discover how it could happen that they should go so far astray and We seem to hear what many of them answer and plead in excuse: The Church and those proclaiming attachment to the Church favor the rich, neglect the workers and have no concern for them; therefore, to look after themselves they had to join the ranks of socialism .
Source: Quadragesimo Anno (Vatican.va)