If you speak in Spanish to a local, you will be largely understood and as a rule they will freely converse with you, but from time to time, more so with the older generation, you may be politely reminded that you are in Portugal and the native language is Portuguese.