Pope Pius XI
Quadragesimo Anno §120
Quadragesimo Anno: On Reconstruction of the Social Order
120 If Socialism, like all errors, contains some truth (which, moreover, the Supreme Pontiffs have never denied), it is based nevertheless on a theory of human society peculiar to itself and irreconcilable with true Christianity. Religious socialism, Christian socialism, are contradictory terms; no one can be at the same time a good Catholic and a true socialist.
Source: Quadragesimo Anno (Vatican.va)