"What did you do last weekend?"
Translation:¿Qué hiciste el fin de semana pasado?
It is not about "weekend" as much as it is about fin and semana. Those are two words in Spanish, not the single word weekend as in English.
So what does pasado modify - fin or semana?
Logically, pasado should be modifying semana. The literal translation is "the end of last week". Last modifies week. If it was modifying fin, then we are talking about the last end, which makes no sense because a week has only one end.
I agree it should be pasado, as already stated, because that is how it is said in Spanish. But I don't agree that it is logical.
I believe that "el fin de semana" is taken as a single phrase. It is masculine or sounds masculine because of the el, and that justifies "pasado". So in that sense you are right, "last weekend" = el_fin_de_semana as a single phrase.
However, I believe "El fin de la semana pasada" is also correct. Pasada turns feminine because of the la.
We have issues with compound expressions in English too, like figuring out the plural of attorney general and passer-by and such. How about cupsful vs cupfuls?
EdNed, you are right that fin de semana is a compound term, and it takes the gender of the main noun, i.e. the one that is not the object of a preposition.
"El fin de la semana pasada" is grammatically correct, but as awkward as saying "last week's end" in English. If I heard that, I would assume they were asking about last Sunday evening —or even Friday afternoon, for the end of the workweek—, and not the whole weekend.