To expand on the information given by carlosdca, BCN will know from the tags on your checked bags that even though you have cleared EU immigration, your bags have not yet cleared EU customs. If there were any goods in your checked bags which needed to be declared to customs, you would do it at the EU airport where you claim them. In this case, BCN.