Previous Popes have condemned socialism in all its myriad forms.
Not all Popes have condemned socialism.
Those Popes for whom socialism was a current phenomenon have condemned it, some more strongly than others. John Paul I didn't have a chance to comment on the topic ...